:root {
    --primary-color: #d12403;
    /* Indigo */
    --secondary-color: #ec4899;
    /* Pink */
    --accent-color: #ec5c11;
    /* Violet */
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --glass-border: rgba(255, 255, 255, 0.5);
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

body {
    background-color: var(--bg-color);
    font-family: "Montserrat", sans-serif;
    color: var(--text-primary);
}


/* Glassmorphism Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Product Image */
.product-image-container {
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

/* Mobile Image Height Adjustment */
@media (max-width: 576px) {
    .product-image-container {
        height: 150px;
        /* Reduced height for mobile */
    }
}

.product-image-container img {
    object-fit: contain;
    /* Changed to contain to show full product */
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    padding: 10px;
}

.glass-card:hover .product-image-container img {
    transform: scale(1.05);
}

/* Typography */
.product-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);

    /* Truncate effectively with 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Added standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    /* Approximate height for 2 lines */
    line-height: 1.4em;
}

@media (max-width: 576px) {
    .product-title {
        font-size: 0.9rem;
    }
}

.price-tag {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

@media (max-width: 576px) {
    .price-tag {
        font-size: 1rem;
    }
}

.original-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/* Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

@media (max-width: 576px) {
    .btn-premium {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .card-body.p-4 {
        padding: 0.8rem !important;
        /* Reduce padding on mobile */
    }
}

.btn-premium:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
}

/* Cart Badge */
.nav-cart-badge {
    background-color: var(--secondary-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.page-header {
    background-color: #d22703;
    background-image: url('page_header_bg.webp');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    color: #d22703;
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    animation: panBackground 30s ease-in-out infinite alternate;
}

@keyframes panBackground {
    0% { background-position: left top; background-size: 100% auto; }
    100% { background-position: right top; background-size: 120% auto; }
}



.page-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.page-header p {
    position: relative;
    z-index: 1;
    color: #555;
}

@media (max-width: 768px) {
    .page-header {
        background-position: center;
        animation: none;
    }
}

/* Mobile Cart Adjustments */
.btn-white { background-color: #fff; border-color: #dee2e6; color: #333; }
.btn-white:hover { background-color: #f8f9fa; }
.cart-qty-input-mobile { background-color: #fff !important; }

/* Premium Search Bar */
.premium-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-search-input {
    width: 200px;
    padding: 0.4rem 2.5rem 0.4rem 1.25rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    font-size: 0.9rem;
    color: #334155;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.premium-search-input:focus {
    width: 260px;
    background-color: #ffffff;
    border-color: #d22703;
    box-shadow: 0 4px 12px rgba(210, 39, 3, 0.15);
}

.premium-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s;
}

.premium-search-btn:hover {
    color: #d22703;
}

/* Mobile Premium Search Overlay */
.mobile-search-overlay {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.mobile-search-input-wrapper {
    position: relative;
    width: 100%;
}

.mobile-search-input {
    width: 100%;
    padding: 0.8rem 3rem 0.8rem 1.5rem;
    border-radius: 50px;
    border: 2px solid transparent;
    background-color: #f1f5f9;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.mobile-search-input:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(209, 36, 3, 0.15);
}

.mobile-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.mobile-search-btn:hover {
    background: var(--accent-color);
    transform: translateY(-50%) scale(1.05);
}

/* Optional close button for mobile search */
.mobile-search-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 0.5rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-search-close:hover {
    color: var(--primary-color);
}
