/*
 ASO Online Market - Stylesheet
 - Centralized custom styles layered on Bootstrap
 - Sections: Navigation, Hero, Product cards, Buttons, Forms, Cards, Cart, Footer, Responsive, Utilities, Product details, Rating, Checkout, Admin, Tables, Pagination, Breadcrumb, Search results
*/
/* Custom CSS for E-Commerce Shop */

/* Global styles */
:root {
    /* FreshMart Color Palette */
    --primary-color: #3a5a40;
    --primary-dark: #2d4532;
    --secondary-color: #588157;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --accent-color: #a3b18a;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Typography */
    --font-serif: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #f5f5dc; /* Beige background */
    transition: var(--transition);
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
}

/* Navigation */
.navbar {
    background-color: #ffffff !important;
    background: #ffffff !important;
    opacity: 1 !important;
    border-bottom: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    font-family: var(--font-sans);
    font-weight: 500;
    transition: var(--transition);
    color: var(--gray-700) !important;
    position: relative;
    padding: 0.75rem 1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Hero section */
.hero-section {
    position: relative;
    height: 450px;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.hero-section * {
    color: #ffffff !important;
}

.hero-content h1,
.hero-content p,
.hero-content * {
    color: #ffffff !important;
}

/* Force white text for hero heading specifically */
.hero-section .hero-content h1 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out; /* Slower transition */
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2; /* Ensure active slide is on top */
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide:nth-child(1) {
    background-image: linear-gradient(rgba(58, 90, 64, 0.2), rgba(58, 90, 64, 0.2)),
                      url('../images/s1.webp');
}

.hero-slide:nth-child(2) {
    background-image: linear-gradient(rgba(58, 90, 64, 0.2), rgba(58, 90, 64, 0.2)),
                      url('../images/s2.jpg');
}

.hero-slide:nth-child(3) {
    background-image: linear-gradient(rgba(58, 90, 64, 0.2), rgba(58, 90, 64, 0.2)),
                      url('../images/s3.webp');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
    background: none !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.hero-content .btn {
    color: #000000 !important;
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}

.hero-content .btn:hover {
    color: #ffffff !important;
    background-color: #2d5016 !important;
    border-color: #2d5016 !important;
}

.hero-section h1 {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #ffffff !important;
}

.hero-section p {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff !important;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* Product cards - Clean style like Aso Rock Market */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.product-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-image,
.card-img-top.product-image,
img.product-image,
.product-card img.product-image,
.card.product-card img.product-image {
    width: 100% !important;
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
    object-fit: contain !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    background: transparent;
    display: block;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

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

.product-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
    line-height: 1.4;

    /* Multi-line text truncation */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3a5a40;
    margin-bottom: 0.75rem;
}

.product-card .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Product details below card */
.product-details {
    padding: 0.5rem 0;
    width: 100%;
    margin-top: 0;
    margin-bottom: 1rem;
}

.product-details .btn {
    width: 100% !important;
}

/* Product badge */
.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.product-badge.sale {
    background: var(--danger-color);
}

.product-badge.new {
    background: var(--success-color);
}

/* Buttons */
.btn {
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition);
    padding: 1rem 2rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    font-family: var(--font-sans);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-width: 2px;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    border-color: var(--success-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, var(--success-color));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Modern button variants */
.btn-modern {
    background: var(--white);
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    border-radius: var(--radius-xl);
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--font-sans);
    min-height: 48px;
}

.btn-modern:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Enhanced Add to Cart button specifically */
.btn-primary.add-to-cart,
.home-add-to-cart-btn,
button[class*="add-to-cart"] {
    font-size: 1rem;
    padding: 1rem 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    min-height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(58, 90, 64, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary.add-to-cart:hover,
.home-add-to-cart-btn:hover,
button[class*="add-to-cart"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(58, 90, 64, 0.35);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-primary.add-to-cart:active,
.home-add-to-cart-btn:active,
button[class*="add-to-cart"]:active {
    transform: translateY(-1px);
}

/* Login section */
.login-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
    url('../images/login2.png') center/cover no-repeat fixed;

}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2;
}

.login-section .container {
    position: relative;
    z-index: 3;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: auto;
}

.login-card .card-body {
    color: var(--gray-800);
}

.login-card h2 {
    color: var(--primary-color);
    font-family: var(--font-serif);
    font-weight: 700;
}

.login-card .form-label {
    color: var(--gray-700);
    font-weight: 600;
}

.login-card .form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.login-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(58, 90, 64, 0.25);
}

.login-card .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(58, 90, 64, 0.3);
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 90, 64, 0.4);
}

.login-card .text-decoration-none {
    color: var(--primary-color);
    transition: var(--transition);
}

.login-card .text-decoration-none:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, #f5f5dc 0%, rgba(245, 245, 220, 0.8) 100%); /* Beige gradient */
    border-top: 1px solid rgba(139, 69, 19, 0.1);
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.search-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem; /* Reduced from 3rem 2rem */
    box-shadow: 0 8px 32px rgba(139, 69, 19, 0.1);
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.search-header h2 {
    color: var(--gray-900);
    font-family: var(--font-serif);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(139, 69, 19, 0.2);
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    transition: var(--transition);
    background: var(--white);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(58, 90, 64, 0.25);
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(58, 90, 64, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 90, 64, 0.4);
}

.search-suggestions {
    border-top: 1px solid rgba(139, 69, 19, 0.2);
    padding-top: 1.5rem;
}

.search-results-main {
    max-height: 300px;
    transition: background 0.3s ease;
    cursor: pointer;
}

.search-result-item-main:hover {
    background: var(--gray-50);
}

.search-result-item-main:last-child {
    border-bottom: none;
}

/* Responsive Search Section */
@media (max-width: 768px) {
    .search-card {
        padding: 2rem 1.5rem;
    }

    .search-input-group {
        flex-direction: column;
        gap: 1rem;
    }

    .search-btn {
        width: 100%;
    }

    .search-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .search-card {
        padding: 1.5rem 1rem;
    }

    .search-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .search-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem 0 0.75rem !important;
    margin-top: 3rem !important;
}

.footer-bottom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1rem 0 !important;
    margin-top: 0 !important;
    color: white !important;
}

footer h5, footer h6 {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: var(--font-sans) !important;
    margin-bottom: 1rem !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
}

footer p {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: var(--transition) !important;
}

footer a:hover {
    color: white !important;
}

footer .social-links a {
    color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

footer .social-links a:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

@media (max-width: 992px) {
    .hero-section {
        height: 350px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .navbar-nav .nav-link::after {
        display: none;
    }

    .login-background {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 300px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .product-card .card-body {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    /* Mobile-first navigation */
    .navbar-brand {
        font-size: 1.5rem;
    }

    /* Mobile search */
    .search-results {
        position: fixed;
        top: 60px;
        left: 1rem;
        right: 1rem;
        z-index: 1050;
        max-height: 60vh;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .login-card .card-body {
        padding: 2rem 1.5rem;
    }

    .login-card .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 250px;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-content {
        padding: 0.5rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .login-card {
        margin: 1rem;
        border-radius: var(--radius-lg);
    }

    .login-card .card-body {
        padding: 1.5rem 1rem;
    }

    .login-card h2 {
        font-size: 1.75rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
    }

    .product-card:active {
        transform: scale(0.98);
    }

    .btn:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.95);
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modern Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animation classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.slide-in-down {
    animation: slideInDown 0.4s ease-out;
}

/* Hover effects */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 45px;
    height: 45px;
    bottom: 30px;
    left: 30px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 20px;
    line-height: 45px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    background: #128C7E;
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Font Awesome 5 Brands";
    content: "\f232"; /* WhatsApp icon */
}

.whatsapp-pulse {
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Alert styles */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Custom utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Product details */
.product-details img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-info h1 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.product-price-large {
    font-size: 2rem;
    font-weight: bold;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.stock-status {
    font-weight: 500;
}

.stock-in {
    color: var(--success-color);
}

.stock-low {
    color: var(--warning-color);
}

.stock-out {
    color: var(--danger-color);
}

/* Rating stars */
.rating {
    color: var(--warning-color);
}

.rating i {
    margin-right: 2px;
}

/* Checkout form */
.checkout-section {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
}

.order-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Admin panel */
.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.admin-content {
    padding: 2rem;
}

/* Dashboard cards */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-card.sales {
    border-left-color: var(--success-color);
}

.dashboard-card.orders {
    border-left-color: var(--info-color);
}

.dashboard-card.users {
    border-left-color: var(--warning-color);
}

/* Table styles */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    background: var(--light-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-results-main {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item-main {
    padding: 1rem;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-result-item-main:hover {
    background: rgba(245, 245, 220, 0.3);
    border-left: 3px solid var(--primary-color);
}

.search-result-item-main:last-child {
    border-bottom: none;
}

/* Search Results (Navbar) - Enhanced Layout */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(245, 245, 220, 0.3);
    border-left: 3px solid var(--primary-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item.active {
    background: rgba(58, 90, 64, 0.1);
    border-left: 3px solid var(--primary-color);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
    max-width: 400px;
}

.toast {
    background: var(--white);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-bottom: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--info-color);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
}

.toast.danger {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}

.toast.warning {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

.toast.info {
    border-left-color: var(--info-color);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.05));
}

.toast-icon {
    margin-right: 12px;
    font-size: 1.2em;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.danger .toast-icon {
    color: var(--danger-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--info-color);
}

.toast-content {
    flex: 1;
    color: var(--gray-800);
    font-weight: 500;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    animation: toast-progress 3s linear forwards;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Custom Dropdown Styles */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-toggle-custom {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.dropdown-toggle-custom:hover {
    color: var(--primary-color);
}

.dropdown-toggle-custom i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.dropdown-container:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    border: 1px solid #dee2e6;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu-custom.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item-custom {
    display: block;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item-custom:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-divider-custom {
    height: 1px;
    background-color: #dee2e6;
    margin: 0.5rem 0;
}

/* Mobile responsiveness for custom dropdowns */
@media (max-width: 991.98px) {
    .dropdown-menu-custom {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        margin-top: 0.5rem;
    }

    .dropdown-item-custom {
        padding: 0.25rem 0;
        color: rgba(255, 255, 255, 0.8);
    }

    .dropdown-item-custom:hover {
        background: transparent;
        color: white;
    }
}

/* ==========================
   Cart Page Enhancements
   (Non-breaking, CSS-only)
   ========================== */

/* Sticky summary on large screens */
@media (min-width: 992px) {
  .sticky-lg-top {
    position: sticky;
    top: 1rem;
    z-index: 2;
  }
}

/* Cart summary visual polish */
.cart-summary {
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.cart-summary h3 {
  font-weight: 700;
}

/* Cart item layout helpers (opt-in classes if used) */
.cart-item-row {
  align-items: center;
  gap: 12px;
}
.cart-item-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #eee;
}
.cart-item-title {
  font-weight: 600;
}
.cart-item-meta {
  color: #6c757d;
  font-size: 0.875rem;
}

/* Quantity control buttons (works with existing buttons) */
.qty-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.qty-btn:hover {
  transform: translateY(-1px);
}

/* Price alignment helpers */
.text-price-muted {
  color: #6c757d;
}
.text-price-strong {
  color: var(--success-color, #28a745);
  font-weight: 700;
}

/* Empty state polish */
.cart-empty {
  text-align: center;
  padding: 2rem 1rem;
}
.cart-empty .icon {
  font-size: 4rem;
  color: #ced4da;
}

/* Responsive tweaks */
@media (max-width: 576px) {
  .cart-item-thumb { width: 72px; height: 72px; }
  .cart-summary { padding: 18px !important; }
}

/* Compact quantity buttons (applied via JS classes) */
.qty-compact {
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.qty-compact i { font-size: 0.75rem !important; }

/* Product card Add to Cart button sizing (shop.php) */
.shop-add-to-cart-btn {
  padding: 6px 10px !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
  line-height: 1.2 !important;
}
.shop-add-to-cart-btn i {
  font-size: 0.9rem !important;
  margin-right: 0.35rem !important;
}

@media (max-width: 576px) {
  .shop-add-to-cart-btn { padding: 5px 9px !important; font-size: 0.88rem !important; }
  .shop-add-to-cart-btn i { font-size: 0.85rem !important; }
}

/* Product page Related products Add to Cart buttons */
.related-add-to-cart-btn {
  padding: 6px 10px !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
  line-height: 1.2 !important;
}
.related-add-to-cart-btn i {
  font-size: 0.9rem !important;
  margin-right: 0.35rem !important;
}

@media (max-width: 576px) {
  .related-add-to-cart-btn { padding: 5px 9px !important; font-size: 0.88rem !important; }
  .related-add-to-cart-btn i { font-size: 0.85rem !important; }
}

/* ===== Unified Product Card Compact Sizing (Home + Shop + Related) ===== */
.product-card .card-body { padding: 0.5rem !important; }
.product-card .product-title { font-size: 0.9rem !important; font-weight: 600; }
.product-card .product-price { font-size: 0.95rem !important; font-weight: 700; }
.product-card .product-image,
.product-card .card-img-top.product-image,
.product-card img.product-image,
.card.product-card .product-image,
.card.product-card img.product-image { 
    height: 450px !important; 
    min-height: 450px !important;
    max-height: 450px !important;
    object-fit: contain !important; 
}

@media (max-width: 576px) {
  .product-card .card-body { padding: 0.4rem !important; }
  .product-card .product-image,
  .product-card .card-img-top.product-image,
  .product-card img.product-image,
  .card.product-card .product-image,
  .card.product-card img.product-image { 
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
  }
}

/* Compact button sizing overrides (Home + Shop + Related) */
.shop-add-to-cart-btn,
.home-add-to-cart-btn,
.related-add-to-cart-btn {
  padding: 0.4rem 0.6rem !important;
  font-size: 0.8rem !important;
  border-radius: 8px !important;
  line-height: 1.2 !important;
}
.shop-add-to-cart-btn i,
.home-add-to-cart-btn i,
.related-add-to-cart-btn i {
  font-size: 0.7rem !important;
}

/* Product Detail Page Image Sizing */
.product-details-section .product-main-image {
    max-height: 400px;
    width: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

/* Image Modal */
#imageModal .modal-dialog {
    max-width: 90%;
    max-height: 90vh;
}

#imageModal .modal-body img {
    max-height: 75vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

/* ===== Cart item card compact sizing (per-item cards) ===== */
.cart-item-card .card-body { padding: 2px 8px !important; }
.cart-item-card .row { --bs-gutter-x: 0.75rem; --bs-gutter-y: 0rem; }
.cart-item-card .card-body > .row { display: flex !important; flex-wrap: wrap; gap: 0; }
.cart-item-card .card-body > .row > .col-md-2,
.cart-item-card .card-body > .row > .col-md-4,
.cart-item-card .card-body > .row > .col-md-3 { flex: unset !important; max-width: unset !important; }
.cart-item-card .quantity-controls { gap: 0.5rem !important; }

@media (max-width: 576px) {
  .cart-item-card .card-body > .row { flex-wrap: wrap; row-gap: 0; }
}
.cart-item-card .product-image { height: 130px !important; object-fit: contain !important; background: #f9fafb; border-radius: 8px; }
.cart-item-card h5 { margin-bottom: 4px !important; font-size: 1rem !important; line-height: 1.2 !important; }
.cart-item-card .category-badge { font-size: 0.8rem !important; padding: 0.2rem 0.55rem !important; }
.cart-item-card .price-display { margin-top: 2px !important; font-size: 1rem !important; }
.cart-item-card .quantity-controls { gap: 0.35rem !important; }
.cart-item-card .quantity-btn { width: 28px !important; height: 28px !important; }
.cart-item-card .quantity-display { min-width: 32px !important; font-size: 0.95rem !important; }

@media (max-width: 576px) {
  .cart-item-card .product-image { height: 110px !important; }
  .cart-item-card h5 { font-size: 0.95rem !important; }
  .cart-item-card .price-display { font-size: 0.95rem !important; }
}

/* (Reverted) cart-item-card global overrides removed to restore original per-item card styling */

/* (Reverted) remove cart-item-row grid overrides */

/* Single card wrapper housing all cart items */
.cart-list-card { border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.cart-list-card .card-body { padding: 8px 10px; }
.cart-item-row .product-image { height: 110px !important; object-fit: contain !important; }
.cart-item-row .quantity-controls { gap: .25rem !important; }
.cart-item-row .quantity-btn { width: 26px !important; height: 26px !important; }
.cart-item-row .remove-btn { padding: .15rem .4rem !important; margin-left: 6px !important; }
.cart-item-row .price-display { margin: 0 !important; font-size: 0.95rem !important; white-space: nowrap !important; }

/* (Reverted) remove cart-item-row mobile overrides */

/* (Reverted) remove neutralization of cart-item-card visuals */


/* Shop page specific sizing overrides */
#productsContainer .product-card .card-body { padding: 0.5rem !important; }
#productsContainer .product-card .product-title {
  font-size: 0.9rem !important;
  margin-bottom: 0.25rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2 !important;
}
#productsContainer .product-card .product-price { font-size: 1rem !important; margin-bottom: 0.5rem !important; font-weight: 700 !important; }

/* Force image height on all product cards in productsContainer */
#productsContainer .product-image-container {
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
}

#productsContainer .product-card .product-image,
#productsContainer .product-card .card-img-top.product-image,
#productsContainer .product-card img.product-image,
#productsContainer .card.product-card .product-image,
#productsContainer .card.product-card img.product-image,
#productsContainer .product-image-container img.product-image,
#productsContainer .product-image-container .card-img-top.product-image { 
    height: 450px !important; 
    min-height: 450px !important;
    max-height: 450px !important;
    object-fit: contain !important;
    width: 100% !important;
}

@media (max-width: 576px) {
  #productsContainer .product-card .card-body { padding: 0.45rem !important; }
  #productsContainer .product-image-container {
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
  }
  #productsContainer .product-card .product-image,
  #productsContainer .product-card .card-img-top.product-image,
  #productsContainer .product-card img.product-image,
  #productsContainer .card.product-card .product-image,
  #productsContainer .card.product-card img.product-image,
  #productsContainer .product-image-container img.product-image,
  #productsContainer .product-image-container .card-img-top.product-image { 
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
    width: 100% !important;
  }
}

/* Global Mobile Navigation Consistency - Ensure mobile nav works on all pages */
@media (max-width: 991.98px) {
  body {
    padding-top: 80px !important;
  }
  
  /* Hide main navbar on mobile to prevent overlap */
  .navbar {
    display: none !important;
  }
  
  .mobile-nav-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1025 !important;
    background: white !important;
    border-bottom: 1px solid #e9ecef !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  }
}


/* Product Status Badges */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    width: 100%;
}

/* Spacing between product cards - using Bootstrap's default g-4 spacing */

.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.out-of-stock-text {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    background: rgba(220, 53, 69, 0.95);
    border-radius: 4px;
}

/* Revert to original cart item layout and make cards narrower horizontally */
.cart-item-card { margin-bottom: 12px !important; height: 120px !important; }
.cart-item-card .card-body { padding: 1rem !important; max-width: 700px; margin: 0 auto; height: 100% !important; display: flex; align-items: center; }
.cart-item-card .product-image { height: 90px !important; width: auto !important; object-fit: contain !important; display: block !important; max-width: 100% !important; }
.cart-item-card .price-display { margin-bottom: 1rem !important; }
.cart-item-card .quantity-controls { gap: 0.5rem !important; }
.cart-item-card .quantity-btn { width: 32px !important; height: 32px !important; }
.cart-item-card .quantity-display { min-width: 40px !important; font-size: 1rem !important; }
.cart-item-card .remove-btn { padding: 0.5rem !important; font-size: inherit !important; }

/* Mobile: allow cart item to expand to show all controls */
@media (max-width: 576px) {
  .cart-item-card { height: auto !important; min-height: 120px; }
  .cart-item-card .card-body { height: auto !important; align-items: flex-start !important; }
  .cart-item-card .product-image { height: 70px !important; width: auto !important; max-width: 100% !important; }
  .cart-item-card .col-md-2 { flex: 0 0 80px !important; max-width: 80px !important; }
}

/* Mobile: rotate cart images for better fit */
@media (max-width: 576px) {
  .cart-item-card .product-image {
    transform: rotate(90deg);
    transform-origin: center center;
    transition: transform 0.2s ease-in-out;
    display: block;
  }
}

/* FINAL OVERRIDE - Force product image height to 450px everywhere with maximum specificity */
body .container .row#productsContainer .col-6.col-sm-6.col-md-3.col-lg-3.mb-4 .card.product-card .product-image-container,
body .container .row#productsContainer .col-6.col-sm-6.col-md-3.col-lg-3.mb-4 .card.product-card .product-image-container img.product-image,
body .container .row#productsContainer .col-6.col-sm-6.col-md-3.col-lg-3.mb-4 .card.product-card .product-image-container .card-img-top.product-image,
body .container .row#productsContainer .col-6.col-sm-6.col-md-3.col-lg-3.mb-4 .card.product-card img.product-image,
body .container .row#productsContainer .col-6.col-sm-6.col-md-3.col-lg-3.mb-4 .card.product-card .card-img-top.product-image {
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
}

body .container .row .col-6 .card.product-card .product-image-container,
body .container .row .col-6 .card.product-card .product-image-container img.product-image,
body .container .row .col-6 .card.product-card img.product-image,
body .container .row .col-6 .card.product-card .card-img-top.product-image {
    height: 450px !important;
    min-height: 450px !important;
    max-height: 450px !important;
}
