/* --- Color and Font Variables --- */
:root {
    --primary-green: #4A5D52;
    --accent-pink: #E6C2C2;
    --bg-off-white: #F5F1ED;
    --text-charcoal: #333333;
    --border-grey: #D9D9D9;
}

/* --- Base Typography & Colors --- */
html, body {
    background-color: var(--bg-off-white);
    color: var(--text-charcoal);
}

body {
    font-family: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: var(--text-charcoal);
}

a {
    color: var(--primary-green);
}

a:hover, a:focus {
    color: #3a4a41;
}

.btn-primary {
    --bs-btn-bg: var(--primary-green);
    --bs-btn-border-color: var(--primary-green);
    --bs-btn-hover-bg: #3f5248;
    --bs-btn-hover-border-color: #3f5248;
}

.btn-outline-primary {
    --bs-btn-color: var(--primary-green);
    --bs-btn-border-color: var(--primary-green);
    --bs-btn-hover-bg: var(--primary-green);
    --bs-btn-hover-border-color: var(--primary-green);
}

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

.navbar.bg-body-tertiary {
    background-color: var(--bg-off-white) !important;
    transition: background-color .3s ease, backdrop-filter .3s ease, border-color .3s ease;
}

/* Smooth transitions for header elements */
body .navbar,
body .navbar .navbar-brand,
body .navbar .nav-link,
body .navbar .navbar-toggler,
body .navbar .social-icons a,
body .navbar .social-icons a i {
    transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}

/* Fixed-top navbar compensation and homepage overlay behavior */
body {
    padding-top: 4rem;
}

@media (min-width: 992px) {
    body {
        padding-top: 4.5rem;
    }
}

/* Slightly larger social icons for better visibility */
.social-icons a i, .social-icons-mobile a i, .social-icons-footer a i {
    font-size: 1.15em;
}

/* Ensure brand hover styles win over themed defaults */
/* Hover overrides all: brand background and white icon */
.social-icons a.facebook:hover {
    background: #1877f2 !important;
    border-color: #1877f2 !important;
}

.social-icons a.facebook:hover i {
    color: #fff !important;
}

.social-icons a.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    border-color: #e1306c !important;
}

.social-icons a.instagram:hover i {
    color: #fff !important;
}

footer .nav-link {
    color: var(--text-charcoal);
}

footer .nav-link:hover,
footer .nav-link:focus {
    color: var(--primary-green);
}

/* Footer navigation links */
.footer-nav .nav-link {
    padding: 0.25rem 0;
}

/* On mobile, center the link columns */
@media (max-width: 991.98px) {
    .footer-nav {
        text-align: center;
    }
}

/* Carousel full-bleed image fit */
.object-fit-cover {
    object-fit: cover;
}

.object-fit-contain {
    object-fit: contain;
}

.intro-image-wrapper {
    background-color: var(--bg-off-white);
}

.intro-image-wrapper img {
    display: block;
}

.about-image-wrapper {
    width: 100%;
}

.about-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

/* Readable caption background for contrast */
.carousel-caption {
    background: rgba(51, 51, 51, 0.65);
    backdrop-filter: blur(2px);
    padding: 1rem 1.25rem;
    border-radius: .5rem;
    right: 5%;
    left: 5%;
}

.carousel-caption .lead {
    font-size: 1.5rem;
}

@media (max-width: 767.98px) {
    .carousel-caption {
        padding: .5rem .75rem;
    }

    .carousel-caption h1, .carousel-caption .h1 {
        font-size: 1.5rem;
    }

    .carousel-caption h2, .carousel-caption .h2 {
        font-size: 1.25rem;
    }

    .carousel-caption .lead {
        font-size: 1rem;
    }
}

@media (max-width: 349.98px) {
    .carousel-caption {
        padding: .35rem .5rem;
    }

    .carousel-caption h1, .carousel-caption .h1 {
        font-size: 1.15rem;
    }

    .carousel-caption h2, .carousel-caption .h2 {
        font-size: 1rem;
    }

    .carousel-caption .lead {
        font-size: 0.85rem;
    }
}

.hero-carousel-caption {
    top: clamp(5rem, 18vh, 9rem);
    bottom: auto;
}

@media (max-width: 991.98px) {
    .hero-carousel-caption {
        top: clamp(5rem, 22vh, 8rem);
    }
}

@media (max-width: 767.98px) {
    .hero-carousel-caption {
        top: 6rem;
    }
}

@media (min-width: 768px) {
    .hero-carousel-caption h1, .hero-carousel-caption .h1 {
        font-size: 2.25rem;
    }
}

.hero-carousel-caption .btn-primary {
    background-color: #65495d;
    border-color: #65495d;
    font-size: 1.25rem;
}

/* Improve visibility of carousel controls */
.carousel-control-overlay {
    width: auto;
    padding: .75rem;
}

.carousel-control-overlay .carousel-control-prev-icon,
.carousel-control-overlay .carousel-control-next-icon {
    background-color: rgba(51, 51, 51, 0.9);
    opacity: 0.85;
    transition: opacity .2s ease;
    background-size: 55% 55%;
    border-radius: 999px;
    padding: 1.5rem; /* slightly bigger */
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

.carousel-control-overlay:hover .carousel-control-prev-icon,
.carousel-control-overlay:hover .carousel-control-next-icon,
.carousel-control-overlay:focus-visible .carousel-control-prev-icon,
.carousel-control-overlay:focus-visible .carousel-control-next-icon {
    opacity: 1;
}

/* Generic horizontal scroller (shared by Product thumbs and Featured row) */
.h-scroll-wrapper {
    position: relative;
}

.h-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: .25rem;
    scrollbar-gutter: stable both-edges;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.h-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
}

.h-scroll-btn-left {
    left: -0.5rem;
}

.h-scroll-btn-right {
    right: -0.5rem;
}

.h-scroll-btn-hidden {
    display: none !important;
}

footer {
    border-top: 1px solid var(--border-grey);
}

.footer-credit {
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer-credit a {
    color: #9ca3af;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-credit a:hover {
    color: #6b7280;
}

.footer-credit a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Social Media Icons (Header, Mobile, Footer) */
.social-icons a, .social-icons-mobile a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(74, 93, 82, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 93, 82, 0.2);
    text-decoration: none;
    color: var(--text-charcoal, #333333);
    font-size: 1.1rem;
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.social-icons-mobile a {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    margin: 0 0.5rem;
}

.social-icons-footer {
    white-space: nowrap;
}

.social-icons-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(74, 93, 82, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 93, 82, 0.2);
    text-decoration: none;
    color: var(--text-charcoal, #333333);
    font-size: 1.3rem;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

/* Product cards: normalize title and meta heights for consistent card height */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-title.line-clamp-2 {
    min-height: 2.5rem;
}

.product-card .product-meta-row {
    min-height: 1.5rem;
}

.social-icons a:hover, .social-icons-mobile a:hover, .social-icons-footer a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Social Icon Brand Colors on Hover */
.social-icons a.facebook:hover, .social-icons-mobile a.facebook:hover, .social-icons-footer a.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.social-icons a.instagram:hover, .social-icons-mobile a.instagram:hover, .social-icons-footer a.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #e1306c;
    color: white;
}
