/* Packs Index Page - Custom Styles */

/* Page Description Header - Third Header */
.page-description-header {
    background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(255,215,0,0.05) 100%);
    border-top: 1px solid rgba(255,215,0,0.3);
    border-bottom: 1px solid rgba(255,215,0,0.3);
    padding: 0.8rem 0;
    margin-bottom: 0.5rem;
    position: relative;
    backdrop-filter: blur(5px);
}

.page-description-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.page-description-text {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 0 5px rgba(255,255,255,0.2);
}

/* Products Grid - 2 cards per row on desktop, 1 on mobile */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
    margin-top: 10px;
    max-width: 1320px;
    margin: 10px auto 0;
    padding: 0 0.8rem;
}

/* Product Card - Larger size for packs */
.product-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 3px solid #FFD700;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.15s ease;
    backdrop-filter: blur(10px);
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    text-align: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: #FFE55C;
    box-shadow: 0 6px 20px rgba(255,215,0,0.3), 0 3px 10px rgba(0,0,0,0.3);
}

/* Product Image Container - Larger for better visibility */
.product-image-container {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
}

/* Product Image - Optimized for collage display */
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.15s ease;
    background: #333;
    border-radius: 0;
    opacity: 1;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Image hover: zoom only when hovering the image area */
.product-image-container:hover {
    overflow: visible;
}

.product-image-container:hover .product-image,
.product-image:hover {
    transform: scale(1.25);
    transform-origin: center center;
    border-radius: 20px;
}

/* Allow image to overflow card only when hovering image area */
.product-card:has(.product-image-container:hover) {
    overflow: visible;
    z-index: 20;
}

/* Product Content - Better spacing */
.product-content {
    padding: 0.6rem 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 0.1rem;
}

/* Product Title - Larger and more prominent */
.product-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.1rem;
    margin-top: 0.3rem;
    line-height: 1.3;
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Amiri', serif;
}



/* Product Description - Better readability */
.product-description {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 0.1rem;
    line-height: 1.4;
    min-height: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pack Products List - قائمة المنتجات في الباك */
.pack-products-list {
    margin-bottom: 0.8rem;
    padding: 0.6rem;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
}

.pack-products-title {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.pack-products-items {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.pack-product-item {
    color: #ddd;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    padding: 0.15rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    font-family: 'Cairo', sans-serif;
    line-height: 1.3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pack-product-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.pack-product-item::before {
    content: '📦';
    margin-left: 0.4rem;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.product-name {
    flex: 1;
    text-align: right;
}

.product-quantity {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.75rem;
    background: rgba(255, 215, 0, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Price Container - More prominent */
.price-container {
    margin-bottom: 0.8rem;
}

.new-price {
    color: var(--gold);
    font-size: 1.6rem;
    font-weight: 900;
    font-family: 'Amiri', serif;
    animation: priceGlow 2s ease-in-out infinite alternate;
}

@keyframes priceGlow {
    0% {
        text-shadow: 0 0 5px rgba(255,215,0,0.2);
    }
    100% {
        text-shadow: 0 0 15px rgba(255,215,0,0.8), 0 0 25px rgba(255,215,0,0.6);
    }
}

.currency {
    font-size: 1rem;
    font-weight: 600;
    margin-right: 2px;
}

/* Product Actions - Better button styling */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: auto;
}

.order-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--black);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 2px solid var(--gold);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(255,215,0,0.2);
    position: relative;
    overflow: hidden;
}

.order-btn:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    color: var(--black);
    border: 2px solid #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.6), 0 0 15px rgba(0,0,0,0.8);
}

.add-to-cart-btn {
    background: #000;
    color: #fff;
    border: 2px solid #000;
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    will-change: transform, box-shadow;
}

.add-to-cart-btn:hover {
    background: #000;
    color: #fff;
    border: 2px solid var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255,215,0,0.6), 0 0 15px rgba(255,215,0,0.8);
}

.add-to-cart-btn:active {
    transform: translateY(0);
    transition: all 0.1s ease-out;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
        padding: 0 0.8rem;
    }

    .product-card {
        min-height: 440px;
    }

    .product-image-container {
        height: 210px;
    }

    .product-content {
        padding: 1.2rem;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .new-price {
        font-size: 1.4rem;
    }

    .pack-products-list {
        padding: 0.4rem;
    }

    .pack-products-title {
        font-size: 0.75rem;
    }

    .pack-product-item {
        font-size: 0.65rem;
    }

    .product-quantity {
        font-size: 0.6rem;
        padding: 0.05rem 0.2rem;
    }

    .product-quantity {
        font-size: 0.65rem;
        padding: 0.05rem 0.25rem;
    }

    .product-actions {
        flex-direction: row;
        gap: 0.5rem;
    }

    .order-btn, .add-to-cart-btn {
        flex: 1;
        padding: 0.7rem;
        font-size: 0.78rem;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .page-description-header {
        padding: 0.6rem 0;
        margin-bottom: 0.3rem;
    }
    
    .page-description-container {
        padding: 0 1rem;
    }
    
    .page-description-text {
        font-size: 0.9rem;
        line-height: 1.3;
        color: var(--white);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 0 0.6rem;
    }
    
    .product-card {
        min-height: 400px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-content {
        padding: 1rem;
    }

    .product-title {
        font-size: 1.1rem;
    }

    .new-price {
        font-size: 1.3rem;
    }

    .pack-products-list {
        padding: 0.5rem;
    }

    .pack-products-title {
        font-size: 0.8rem;
    }

    .pack-product-item {
        font-size: 0.7rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .order-btn, .add-to-cart-btn {
        width: 100%;
        padding: 0.7rem;
        font-size: 0.78rem;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .page-description-header {
        padding: 0.5rem 0;
        margin-bottom: 0.2rem;
    }
    
    .page-description-text {
        font-size: 0.8rem;
        line-height: 1.2;
        color: var(--white);
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .product-card {
        transition: transform 0.1s ease;
    }
    
    .product-card:hover {
        transform: translateY(-1px);
    }
    
    .product-image {
        transition: transform 0.1s ease;
    }
    
    .product-card:hover .product-image {
        transform: scale(1.01);
    }
    
    .order-btn {
        transition: transform 0.1s ease;
    }
    
    .order-btn:hover {
        transform: translateY(0);
    }
    
    .product-title {
        animation: none;
        text-shadow: none;
        color: var(--gold);
    }
}

/* Disable animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Disable hover effects and animations for pack cards on mobile */
@media (max-width: 768px) {
    .product-card,
    .product-card * {
        transition: none !important;
        animation: none !important;
    }
    .product-card:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: #FFD700 !important;
    }
    .product-image-container:hover {
        overflow: hidden !important;
    }
    .product-image-container:hover .product-image,
    .product-image:hover {
        transform: none !important;
        border-radius: inherit !important;
    }
    .product-card:has(.product-image-container:hover) {
        overflow: hidden !important;
        z-index: auto !important;
    }
    .order-btn:hover,
    .add-to-cart-btn:hover {
        transform: none !important;
    }
}
