/* ============================================
   PREMIUM SHOP PAGE REDESIGN
   Beautiful Product Cards with Animations
   ============================================ */

/* ==============================================
   SHOP HEADER SECTION
   ============================================== */

#shop-section .section-header-primary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#shop-section .section-header-title h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    letter-spacing: -0.5px;
}

#shop-section .section-header-title p {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0;
}

#shop-section .section-header-actions {
    display: flex;
    gap: 1rem;
}

/* ==============================================
   PRODUCT GRID LAYOUT
   ============================================== */

#shop-section #shopItemsGridContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================
   PREMIUM PRODUCT CARD
   ============================================== */

.shop-product-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.shop-product-card:hover {
    transform: translateY(-8px);
    border-color: #FFA94D;
    box-shadow:
        0 8px 24px rgba(255, 169, 77, 0.15),
        0 0 0 1px rgba(255, 169, 77, 0.1);
}

/* ==============================================
   PRODUCT IMAGE AREA
   ============================================== */

.shop-product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.shop-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.shop-product-card:hover .shop-product-image img {
    transform: scale(1.08);
}

.shop-product-image.no-image {
    background: linear-gradient(135deg, #fff9f0 0%, #fff3d0 100%);
    color: #FFA94D;
    font-size: 2.5rem;
}

.shop-product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.shop-product-card:hover .shop-product-image::after {
    background: rgba(0, 0, 0, 0.05);
}

/* Badges on product image */
.shop-product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: white;
    color: #FFA94D;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    z-index: 2;
}

.shop-product-badge.available {
    background: #ecfdf5;
    color: #047857;
}

.shop-product-badge.unavailable {
    background: #fef2f2;
    color: #dc2626;
}

/* ==============================================
   PRODUCT CONTENT
   ============================================== */

.shop-product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-product-header {
    margin-bottom: 0.75rem;
}

.shop-product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.375rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-product-category {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.shop-product-description {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 0.75rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==============================================
   PRODUCT PRICING
   ============================================== */

.shop-product-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 1rem 0;
}

.shop-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFA94D;
}

.shop-product-original-price {
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* ==============================================
   PRODUCT FOOTER/ACTIONS
   ============================================== */

.shop-product-footer {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f5f5f5;
}

.shop-product-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.shop-product-btn-primary {
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.3);
}

.shop-product-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 169, 77, 0.4);
}

.shop-product-btn-secondary {
    background: var(--bg-light);
    color: var(--text-medium);
    border: 1px solid var(--border-light);
    flex: 0.5;
}

.shop-product-btn-secondary:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

/* ==============================================
   FILTER TABS REDESIGN
   ============================================== */

#shop-section .filter-toolbar {
    background: linear-gradient(135deg, #fff9f0 0%, #fff8e7 100%);
    border: 1px solid #ffd699;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* Ensure hidden filter-toolbar is completely hidden */
#shop-section .filter-toolbar.hidden {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
}

#shop-section .filter-toolbar>div:first-child {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#shop-section [data-shop-filter] {
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    background: white;
    color: var(--text-medium);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#shop-section [data-shop-filter]:hover {
    background: white;
    border-color: #FFA94D;
    color: #FFA94D;
}

#shop-section [data-shop-filter].active,
#shop-section [data-shop-filter][style*="border-blue"] {
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%);
    color: var(--text-dark);
    border-color: #FFA94D;
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.3);
}

/* ==============================================
   EMPTY STATE REDESIGN
   ============================================== */

#shop-section #shopEmptyState {
    text-align: center;
    padding: 4rem 2rem;
}

.shop-empty-icon {
    font-size: 5rem;
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 169, 77, 0.1) 0%, rgba(255, 169, 77, 0.1) 100%);
    border-radius: 1rem;
    color: #FFA94D;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

#shop-section #shopEmptyState h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.75rem;
}

#shop-section #shopEmptyState p {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0 0 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.shop-empty-btn {
    background: linear-gradient(135deg, #FFA94D 0%, #FFA94D 100%);
    color: var(--text-dark);
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(255, 169, 77, 0.3);
}

.shop-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 169, 77, 0.4);
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
    #shop-section #shopItemsGridContainer {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }

    .shop-product-card {
        border-radius: 1rem;
    }

    .shop-product-image {
        height: 180px;
    }

    .shop-product-content {
        padding: 1.25rem;
    }

    .shop-product-name {
        font-size: 1rem;
    }

    .shop-product-footer {
        gap: 0.5rem;
    }

    #shop-section .filter-toolbar {
        padding: 1rem;
    }

    #shop-section .filter-toolbar>div:first-child {
        width: 100%;
    }
}

@media (max-width: 640px) {
    #shop-section #shopItemsGridContainer {
        grid-template-columns: 1fr;
    }

    .shop-empty-icon {
        font-size: 4rem;
        width: 5rem;
        height: 5rem;
    }
}

/* ==============================================
   LOADING STATE
   ============================================== */

.shop-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.shop-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #FFA94D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.shop-loading-text {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-medium);
    font-style: italic;
}

/* ==============================================
   ANIMATIONS
   ============================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shop-skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e8e8e8 50%,
            #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Stagger animation for card list */
#shop-section .shop-product-card {
    animation: fadeIn 0.5s ease-out;
}

#shop-section .shop-product-card:nth-child(1) {
    animation-delay: 0.05s;
}

#shop-section .shop-product-card:nth-child(2) {
    animation-delay: 0.1s;
}

#shop-section .shop-product-card:nth-child(3) {
    animation-delay: 0.15s;
}

#shop-section .shop-product-card:nth-child(n + 4) {
    animation-delay: calc(0.05s * (var(--index) - 3));
}