/**
 * CraftsVilla Art & Craft E-Commerce Styling
 */

:root {
    --primary-color: #8B5A2B;
    --primary-hover: #704722;
    --accent-color: #D4A373;
    --earth-dark: #2B2118;
    --sand-light: #FAEDCD;
    --body-bg: #FDFBF7;
    --text-color: #333333;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.text-accent {
    color: var(--accent-color) !important;
}

body {
    font-family: var(--font-body);
    background-color: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6, .brand-logo {
    font-family: var(--font-heading);
}

.brand-logo {
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.brand-art {
    color: var(--earth-dark);
}

.brand-villa {
    color: var(--primary-color);
}

.btn-art-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-art-primary:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

.card-feature {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.tech-badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
}

/* ==========================================================
 * Responsive Hero Slider Styles
 * ========================================================== */
.hero-slider-container {
    border-radius: 0 0 16px 16px;
    background-color: #1e1b18;
}

.hero-slide-wrapper {
    width: 100%;
    min-height: 280px;
    max-height: 520px;
    background-color: #1a1714;
}

.hero-banner-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(20, 16, 12, 0.85) 0%, rgba(20, 16, 12, 0.5) 60%, rgba(20, 16, 12, 0.1) 100%);
}

.hero-caption-card {
    backdrop-filter: blur(4px);
    background: rgba(30, 25, 20, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tablet Responsive Adjustment (768px - 991px) */
@media (max-width: 991.98px) {
    .hero-banner-img {
        height: 420px;
    }
}

/* Mobile Responsive Adjustment (< 768px) */
@media (max-width: 767.98px) {
    .hero-banner-img {
        height: 340px;
    }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(20, 16, 12, 0.3) 0%, rgba(20, 16, 12, 0.85) 100%);
        align-items: flex-end !important;
        padding-bottom: 2rem;
    }
    .hero-caption-card {
        padding: 1rem !important;
    }
    .hero-caption-card h1 {
        font-size: 1.4rem !important;
    }
}

/* ==========================================================
 * New Styles Added
 * ========================================================== */

.top-bar {
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.main-header {
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    z-index: 1030;
}

.header-search .form-control {
    border-radius: 25px 0 0 25px;
    border-color: #ddd;
    padding-left: 1.2rem;
    background-color: #f8f6f3;
}

.header-search .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.15rem rgba(212, 163, 115, 0.25);
    background-color: #fff;
}

.header-search .btn {
    border-radius: 0 25px 25px 0;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    padding: 0 1.2rem;
}

.header-search .btn:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--earth-dark);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.header-icon:hover {
    background-color: var(--sand-light);
    color: var(--primary-color);
}

.header-icon .cart-count {
    position: absolute;
    top: 0;
    right: -2px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
}

.category-nav {
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.category-nav .nav-link {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    white-space: nowrap;
    transition: color 0.2s ease;
    position: relative;
}

.category-nav .nav-link:hover,
.category-nav .nav-link.active {
    color: var(--primary-color);
}

.category-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* ==========================================================
 * Navigation Category Dropdown & Sub-Menu Styling
 * ========================================================== */
@media (min-width: 768px) {
    .nav-category-dropdown {
        position: relative;
    }
    .nav-category-dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-category-dropdown > .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        min-width: 220px;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
        margin-top: 0;
        padding: 0.5rem 0;
    }
    .nav-category-dropdown .dropdown-item {
        font-size: 0.88rem;
        transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    }
    .nav-category-dropdown .dropdown-item:hover {
        background-color: var(--sand-light, #FAEDCD);
        color: var(--primary-color, #8B5A2B);
        padding-left: 1.25rem !important;
    }
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--earth-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.section-divider {
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.product-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.product-card-img-wrapper {
    aspect-ratio: 1 / 1;
    background-color: #f5f2ee;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-card-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-card-actions {
    opacity: 1;
}

.product-card-actions .btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.product-card-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title:hover {
    color: var(--primary-color);
}

.product-card-price {
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.category-card {
    text-decoration: none;
    display: block;
    text-align: center;
    transition: transform 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background-color: #f5f2ee;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: box-shadow 0.25s ease;
}

.category-card:hover .category-card-img-wrapper {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-card-img {
    transform: scale(1.08);
}

.category-card-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--earth-dark);
    margin-top: 0.5rem;
}

.usp-section {
    background-color: var(--sand-light);
}

.usp-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-color);
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.15);
}

.usp-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--earth-dark);
}

.promo-banner-section {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.promo-banner-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.promo-banner-overlay {
    background: linear-gradient(90deg, rgba(43, 33, 24, 0.85) 0%, rgba(43, 33, 24, 0.4) 60%, transparent 100%);
}

.newsletter-section {
    background-color: var(--sand-light);
}

.newsletter-section .form-control {
    border-radius: 25px 0 0 25px;
    border: 2px solid var(--accent-color);
    padding: 0.7rem 1.2rem;
}

.newsletter-section .btn {
    border-radius: 0 25px 25px 0;
    padding: 0.7rem 1.5rem;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.newsletter-section .btn:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.site-footer {
    background-color: var(--earth-dark);
    color: #c9b99a;
}

.site-footer h5,
.site-footer h6 {
    color: var(--accent-color);
    font-family: var(--font-heading);
}

.site-footer a {
    color: #c9b99a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #fff;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--earth-dark);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-payment-icons span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #c9b99a;
}

.offcanvas-craft {
    max-width: 300px;
}

.offcanvas-craft .offcanvas-header {
    background-color: var(--earth-dark);
    color: #fff;
}

.offcanvas-craft .nav-link {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0ebe5;
    color: var(--text-color);
    font-weight: 500;
}

.offcanvas-craft .nav-link:hover {
    background-color: var(--sand-light);
    color: var(--primary-color);
}

.btn-view-all {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-view-all:hover {
    background-color: var(--primary-color);
    color: #fff;
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.5rem;
    }
    .product-card-actions {
        opacity: 1;
    }
    .category-card-img-wrapper {
        border-radius: 12px;
    }
}

@media (max-width: 575.98px) {
    .section-title {
        font-size: 1.3rem;
    }
    .product-card-title {
        font-size: 0.82rem;
    }
    .product-card-price {
        font-size: 0.85rem;
    }
}
