@import url('https://fonts.googleapis.com/css2?family=Lalezar&family=Vazirmatn:wght@100..900&display=swap');

.product-card {
    transition: transform 0.3s;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    height: 300px;
    object-fit: cover;
}

body {
    background-color: #FDFBF7;
    /* Warm White */
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
}

.navbar {
    background-color: #FDFBF7 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 2px solid #E6DCC5;
    /* Soft Gold */
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 900;
    font-size: 1.8rem;
    color: #10452f !important;
    /* Deep Green */
    letter-spacing: -1px;
}

.nav-link {
    color: #0a2e1f !important;
    /* Darker Green */
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #C5A059 !important;
    /* Gold */
}

.no-caret::after {
    display: none !important;
}

/* Mega Dropdown styling */
.has-mega-menu {
    position: static !important;
}

.mega-dropdown-menu {
    width: 600px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 100%;
    border-radius: 12px;
    background-color: #ffffff !important;
    border: 1px solid #E6DCC5;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(16, 69, 47, 0.1);
}

.category-toggle:hover {
    background-color: #FDFBF7;
}

.category-toggle[aria-expanded="true"] .transition-icon {
    transform: rotate(45deg);
    color: #C5A059 !important;
}

.category-toggle {
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.dropdown-item:active {
    background-color: #10452f;
}

.dropdown-column {
    min-width: 200px;
}

.dropdown-column h6 {
    color: #10452f;
    font-weight: 900;
    border-bottom: 2px solid #E6DCC5;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.dropdown-item {
    color: #0a2e1f;
    padding: 8px 0;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: #FDFBF7;
    color: #C5A059;
    padding-right: 5px;
}

.search-input {
    border-radius: 20px;
    border: 1px solid #E6DCC5;
    padding: 8px 20px;
    background-color: #ffffff;
}

.footer {
    background-color: #0a2e1f !important;
    /* Dark Green Footer */
    color: #FDFBF7;
    border-top: 5px solid #C5A059;
}

.footer p,
.footer a,
.footer li,
.footer span,
.footer .text-muted {
    color: #C5A059 !important;
}

.footer .text-brown {
    color: #C5A059 !important;
}

/* User Profile & General Colors */
.bg-brown {
    background-color: #10452f !important;
}

.text-brown {
    color: #10452f !important;
}

.btn-brown {
    background-color: #10452f;
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    border: none;
    transition: all 0.3s;
}

.btn-brown:hover {
    background-color: #C5A059;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
}

.card {
    border: none;
    transition: transform 0.3s ease;
}

.rounded-4 {
    border-radius: 1.25rem !important;
}

/* Home Categories Section */
.category-box {
    position: relative;
    overflow: hidden;
    height: 350px;
    border-radius: 10px;
    transition: all 0.5s ease;
}

.category-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.category-box:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    text-align: center;
}

.category-overlay h4 {
    margin-bottom: 5px;
    font-weight: 800;
}

.category-overlay span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.section-title {
    position: relative;
    margin-bottom: 40px;
    font-weight: 900;
    color: #10452f;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #E6DCC5;
}

/* Typography for Brand Name */
.brand-typography {
    font-family: 'Lalezar', cursive;
    font-weight: normal;
    font-size: 6rem;
    color: #10452f;
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-align: center;
}

.brand-typography span {
    display: block;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 12px;
    text-indent: 12px;
    /* Centers text when letter-spacing is used */
    text-transform: uppercase;
    color: #C5A059;
    margin-top: -10px;
    text-align: center;
}

.brand-typography::before {
    content: '';
    position: absolute;
    top: -15px;
    right: 50%;
    transform: translateX(50%);
    width: 40px;
    height: 1px;
    background: #E6DCC5;
}

/* User Dashboard Styles */
.dashboard-sidebar .list-group-item {
    border: none;
    padding: 15px 20px;
    margin-bottom: 5px;
    border-radius: 10px !important;
    color: #0a2e1f;
    transition: all 0.3s;
    font-weight: 500;
}

.dashboard-sidebar .list-group-item i {
    width: 25px;
    text-align: center;
}

.dashboard-sidebar .list-group-item:hover,
.dashboard-sidebar .list-group-item.active {
    background-color: #FDFBF7 !important;
    color: #10452f !important;
    padding-right: 25px;
}

.dashboard-sidebar .list-group-item.active {
    font-weight: 800;
}

.form-control:focus {
    border-color: #E6DCC5;
    box-shadow: 0 0 0 0.25rem rgba(230, 220, 197, 0.25);
}

.badge.bg-danger {
    background-color: #c94c4c !important;
}

@media (max-width: 991.98px) {
    .mega-dropdown-menu {
        width: 100%;
        transform: none !important;
        left: 0 !important;
    }
}

/* Admin Panel & Dashboard Styles */
.sidebar {
    height: 100vh;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #FDFBF7 !important;
}

/* Header Responsiveness Fixes */
@media (min-width: 992px) {
    .navbar .container-fluid {
        flex-wrap: nowrap !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-wrap: nowrap !important;
        justify-content: space-between;
    }

    .navbar-nav {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        margin: 0 !important;
    }

    .search-form {
        flex-grow: 1 !important;
        flex-shrink: 1 !important;
        max-width: 350px !important;
        min-width: 100px !important;
        margin-right: 1rem !important;
        margin-left: 1rem !important;
    }

    .navbar-brand {
        white-space: nowrap;
        font-size: 1.6rem !important;
        margin-left: 1rem !important;
        flex-shrink: 0;
        font-family: 'Playfair Display', serif;
    }

    .nav-link {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        display: flex;
        align-items: center;
    }

    .auth-cart-section {
        flex-shrink: 0;
        display: flex !important;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 1200px) and (min-width: 992px) {
    .navbar .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .navbar-brand {
        font-size: 1.4rem !important;
        margin-left: 0.5rem !important;
    }

    .nav-link {
        font-size: 0.85rem !important;
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }

    .search-form {
        max-width: 250px !important;
    }
}

.nav-link {
    white-space: nowrap !important;
}

.dashboard-sidebar .nav-link {
    color: #0a2e1f;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: all 0.2s;
    font-weight: 500;
}

.dashboard-sidebar .nav-link:hover,
.dashboard-sidebar .nav-link.active {
    color: #10452f;
    background-color: #E6DCC5;
    font-weight: 800;
}

/* Global Overrides for Theme Consistency */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-info {
    border: none !important;
}

/* Convert default BS colors to Theme colors sparingly where semantic meaning allows */
.bg-light {
    background-color: #fcfcfc !important;
}

.form-select:focus,
.form-control:focus {
    border-color: #10452f;
    box-shadow: 0 0 0 0.25rem rgba(16, 69, 47, 0.25);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
    border-right: 5px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    border-right: 5px solid #dc3545;
}

/* Hoorrokh Theme Overrides */

/* Override Bootstrap Buttons */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger,
.btn-dark,
.btn-light,
.btn-pastel,
.btn-cream,
.btn-brown {
    background-color: #10452f !important;
    /* Deep Green */
    color: #fff !important;
    border: none !important;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-warning:hover,
.btn-danger:hover,
.btn-dark:hover,
.btn-light:hover,
.btn-pastel:hover,
.btn-cream:hover,
.btn-brown:hover {
    background-color: #C5A059 !important;
    /* Gold */
    color: #fff !important;
}

/* Exception: Outline buttons */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-brown,
.btn-outline-dark,
.btn-outline-danger {
    color: #10452f !important;
    border-color: #10452f !important;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-brown:hover,
.btn-outline-dark:hover,
.btn-outline-danger:hover {
    background-color: #10452f !important;
    color: #fff !important;
}


/* Alerts - Hoorrokh Theme */
.alert,
.alert-success,
.alert-danger,
.alert-warning,
.alert-info {
    background-color: #FDFBF7 !important;
    color: #0a2e1f !important;
    border-color: #E6DCC5 !important;
    border-right: 5px solid #10452f !important;
}

/* Right align all form labels and selects for Persian */
label,
.form-label,
.form-select,
.form-control,
.card-title,
.card-text,
.section-title {
    text-align: right !important;
}

/* Ensure options inside select are also right aligned */
select option {
    text-align: right !important;
}

/* Force direction on common elements */
body,
div,
p,
span,
h1,
h2,
h3,
h4,
h5,
h6,
input,
textarea,
select {
    text-align: right;
}

/* Price Color -> Black */
.text-price,
.fw-bold.text-primary,
.fw-bold.text-dark {
    color: #000000 !important;
}



/* Footer Styles */
.text-brown {
    color: #10452f !important;
}

/* Footer specific overrides */
footer .text-brown {
    color: #C5A059 !important;
}

.social-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E6DCC5;
    border-radius: 8px;
    color: #10452f;
    transition: all 0.3s;
    text-decoration: none;
    background: white;
}

.social-icon:hover {
    background-color: #10452f;
    color: white;
    transform: translateY(-3px);
}

.footer-links a:hover {
    color: #C5A059 !important;
    padding-right: 5px;
    transition: all 0.3s;
}

/* Hero slider sizing */
.hero-carousel .hero-slide {
    min-height: 500px;
}

.hero-slide-logo {
    max-height: 220px;
}

.hero-product-image {
    max-height: 350px;
    object-fit: contain;
}

.hero-image-col {
    justify-content: flex-start !important;
    padding-left: 2rem;
    direction: ltr;
    background: transparent !important;
    border-right: none !important;
}

/* Mobile bottom navbar */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 74px;
    }

    .navbar .container-fluid {
        justify-content: center !important;
    }

    .navbar-brand {
        margin: 0 auto !important;
        font-size: 1.7rem !important;
    }

    .navbar-brand img {
        height: 40px !important;
    }

    .navbar-toggler,
    .desktop-navbar-content {
        display: none !important;
    }

    .hero-carousel .hero-slide {
        min-height: 250px !important;
    }

    .hero-slide-logo {
        max-height: 120px !important;
    }

    .hero-product-image {
        max-height: 160px !important;
    }

    .hero-image-col {
        justify-content: center !important;
        padding-left: 0;
    }

    .hero-product-content {
        padding: 1rem !important;
    }

    .hero-cta-wrap {
        margin-bottom: 1.1rem;
    }

    .hero-slide-title {
        font-size: 1.45rem !important;
        margin-bottom: 0.4rem !important;
    }

    .hero-slide-price {
        font-size: 1rem !important;
        margin-bottom: 0.8rem !important;
    }

    .hero-carousel .btn-lg {
        font-size: 0.85rem !important;
        padding: 0.4rem 1rem !important;
    }

    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        background-color: #FDFBF7;
        border-top: 1px solid #E6DCC5;
        box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
    }

    .mobile-nav-link {
        flex: 1;
        padding: 0.45rem 0.1rem;
        text-decoration: none;
        color: #10452f;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 0.7rem;
        font-weight: 600;
        position: relative;
    }

    .mobile-nav-link i {
        font-size: 1rem;
    }

    .mobile-nav-link.active {
        color: #C5A059;
    }

    .mobile-cart-badge {
        position: absolute;
        top: 3px;
        right: 22%;
        font-size: 0.62rem;
        min-width: 16px;
        line-height: 1.2;
    }
}
