/* ===================================
   SHOP PAGE
   =================================== */

.shop-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-large);
    padding: var(--spacing-large);
}

/* Currency Display */
.currency-display {
    background-color: var(--background-white);
    border: 2px solid var(--border-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.currency-display h2 {
    margin-bottom: var(--spacing-small);
    color: var(--primary-purple);
}

.happiness-amount {
    color: var(--nav-active);
    font-weight: bold;
}

.currency-note {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin: 0;
}

/* Shop Closed Message */
.shop-closed {
    background-color: var(--light-purple);
    border: 2px solid var(--border-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.shop-closed h2 {
    color: var(--primary-purple);
    margin-bottom: var(--spacing-medium);
}

.shop-closed p {
    margin-bottom: var(--spacing-small);
    color: var(--text-dark);
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-purple);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    margin-top: var(--spacing-medium);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--nav-active);
    transform: scale(1.05);
}

/* Pet Preview */
.pet-preview {
    background-color: var(--background-white);
    border: 2px solid var(--border-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
    max-width: 600px;
    width: 100%;
}

.pet-preview h2 {
    text-align: center;
    margin-bottom: var(--spacing-medium);
    color: var(--primary-purple);
}

.pet-preview .pet-display {
    background: var(--light-purple);
    border: 2px solid var(--border-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: var(--spacing-medium);
}

/* Pet Preview Actions */
.pet-preview-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-medium);
}

.btn-unequip-all {
    background-color: var(--primary-purple);
    color: white;
    border: 2px solid var(--primary-purple);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-unequip-all:hover {
    background-color: #5A1F98;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 47, 168, 0.3);
}

.btn-unequip-all:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(106, 47, 168, 0.2);
}

/* Shop Items */
.shop-items {
    background-color: var(--background-white);
    border: 2px solid var(--border-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
    max-width: 1000px;
    width: 100%;
}

.shop-items h2 {
    text-align: center;
    margin-bottom: var(--spacing-large);
    color: var(--primary-purple);
}

/* Filter Section */
.shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-medium);
    margin-bottom: var(--spacing-large);
    padding: var(--spacing-medium);
    background-color: var(--light-purple);
    border-radius: 10px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 200px;
}

.filter-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 0.95rem;
}

.filter-select {
    padding: 10px 12px;
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236A2FA8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
    color: var(--info-section-text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-select:hover {
    border-color: var(--primary-purple);
    background-color: #f9f5ff;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 8px rgba(106, 47, 168, 0.4);
    background-color: white;
}

.btn-reset-filters {
    background-color: var(--primary-purple);
    color: white;
    border: 2px solid var(--primary-purple);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    align-self: flex-start;
}

.btn-reset-filters:hover {
    background-color: #5A1F98;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 47, 168, 0.3);
}

.btn-reset-filters:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(106, 47, 168, 0.2);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-large);
}

/* Individual Shop Item */
.shop-item {
    background-color: var(--light-purple);
    border: 2px solid var(--border-purple);
    border-radius: 10px;
    padding: var(--spacing-medium);
    padding-bottom: 50px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.item-preview {
    background-color: white;
    border-radius: 10px;
    padding: var(--spacing-medium);
    margin-bottom: var(--spacing-medium);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-type {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--primary-purple);
    font-weight: 500;
    font-size: 0.85rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 5;
}

.shop-item h3 {
    color: var(--primary-purple);
    margin-bottom: var(--spacing-small);
}

.item-description {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-medium);
    min-height: 40px;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-small);
}

.item-cost {
    font-weight: bold;
    color: var(--btn-action-purple);
    font-size: 1.1rem;
}

.buy-btn {
    padding: 10px 20px;
    background-color: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background-color: var(--nav-active);
    transform: scale(1.05);
}

.buy-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.equip-btn {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.equip-btn:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.equip-btn.equipped {
    background-color: #dc3545;
}

.equip-btn.equipped:hover {
    background-color: #c82333;
}

.owned-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--nav-active);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 8;
}

.shop-item.owned {
    opacity: 0.7;
}

.shop-item.owned .buy-btn {
    display: none;
}

.shop-item.owned .owned-badge {
    display: inline-block !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: 1fr;
    }

    .item-footer {
        flex-direction: column;
    }

    .buy-btn {
        width: 100%;
    }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Modal Content */
.modal-content {
    background-color: #DFCDE7;
    border: 3px solid var(--primary-purple);
    border-radius: 15px;
    padding: var(--spacing-large);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    color: var(--primary-purple);
    margin-bottom: var(--spacing-medium);
    text-align: center;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-dark);
    margin-bottom: var(--spacing-large);
    text-align: center;
    font-size: 1.1rem;
}

.modal-buttons {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-medium);
    justify-content: center;
    align-items: baseline;
}

.modal-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    vertical-align: middle;
}

.modal-buttons .btn-primary {
    background-color: var(--primary-purple);
    color: white;
}

.modal-buttons .btn-primary:hover {
    background-color: var(--nav-active);
    transform: scale(1.05);
}

.modal-buttons .btn-secondary {
    background-color: white;
    color: var(--text-dark);
}

.modal-buttons .btn-secondary:hover {
    background-color: #ccc;
    transform: scale(1.05);
}

/* No Results Message */
.no-results-message {
    color: var(--text-medium);
    font-size: 1.1rem;
    padding: 40px 20px;
}

.no-results-message p {
    margin: 10px 0;
}

.no-results-message p:first-child {
    font-weight: 600;
    color: var(--primary-purple);
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-medium);
    transition: all 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.favorite-btn:hover {
    color: var(--primary-purple);
    transform: scale(1.2);
}

.favorite-btn.favorited {
    color: #ff1493;
    animation: heartbeat 0.3s ease;
}

.favorite-btn.favorited:hover {
    color: #ff69b4;
    transform: scale(1.3);
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

