/* --- GLOBAL --- */
:root {
    --primary-color: #2D4032;
    --text-dark: #222;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --transition: all 0.3s ease;
}

html { min-height: 100%; margin: 0; padding: 0; overflow-y: scroll; }
body { min-height: 100%; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: #fafafa; display: flex; flex-direction: column; padding-top: 54px; }
body > nav { position: fixed; top: 0; left: 0; right: 0; }
section { margin: 0; padding: 0; }

/* --- SECTION TITLES --- */
.section-title {
    text-align: left;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 50px 0 20px;
}

.content-wrapper { max-width: 1080px; width: 100%; margin: 0 auto; padding: 0 20px; flex: 1; text-align: left; box-sizing: border-box; }

/* --- NAV BAR (Horizontal Fix) --- */
nav { background: var(--white); border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; width: 100%; }
.nav-container { max-width: 1080px; width: 100%; margin: 0 auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; }
.nav-main { display: flex; gap: 25px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-auth { display: flex; gap: 8px; }
nav a { text-decoration: none; color: var(--text-dark); font-weight: 500; font-size: 14px; }

/* Nav link hover effects */
.nav-main a {
    position: relative;
    transition: color 0.3s ease;
}

.nav-main a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-main a:hover {
    color: var(--primary-color);
}

.nav-main a:hover::after {
    width: 100%;
    left: 0;
}

/* Cart Icon */
.cart-icon {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    color: var(--text-dark);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-icon:hover { color: var(--primary-color); }
.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- HERO: HEIGHT MATCH LOGO --- */
.aligned-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: stretch; /* Forces carousel container height to match the logo image height */
    margin: 40px 0;
    padding: 0;
}
.logo-container img { width: 350px; height: auto; display: block; border-radius: 20px; }

/* --- INNER PAGE HEADER (Smaller Logo, Left-Aligned to Match Index) --- */
.page-header {
    margin: 20px 0 10px;
    padding: 0;
}
.page-header .logo-container {
    margin: 0;
    padding: 0;
}
.page-header .logo-container a {
    display: inline-block;
}
.page-header .logo-container img { 
    width: 126px; 
    height: auto; 
    display: block; 
    border-radius: 14px; 
}
.page-header.with-title {
    display: flex;
    align-items: center;
}
.page-header .page-title {
    flex: 1;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    padding-right: 126px; /* Offset for logo width to truly center over content */
}

/* Ensure logo-container has no default margins anywhere */
.logo-container {
    margin: 0;
    padding: 0;
}

/* --- CAROUSEL CONTAINER --- */
.carousel-container {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        0 8px 30px rgba(0, 0, 0, 0.2),
        0 2px 0 rgba(0, 0, 0, 0.1);
}

/* --- CAROUSEL SLIDES WITH KEN BURNS --- */
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-image: var(--slide-bg);
    transform: scale(1);
    transition: transform 6s ease-out;
}

.slide.active::before {
    transform: scale(1.04); /* Subtle Ken Burns zoom effect */
}


/* Cinematic gradient overlay */
.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.1) 40%,
        rgba(0, 0, 0, 0) 60%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* --- TYPEWRITER TEXT ANIMATION --- */
.caption {
    position: relative;
    z-index: 2;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.caption p {
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin: 0;
    padding: 0;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid var(--white);
}

.slide.active .caption p {
    animation: typewriter 1.5s steps(40) 0.3s forwards, blink-caret 0.5s step-end 0.3s 4;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--white); }
}

/* --- CAROUSEL NAVIGATION DOTS --- */
.carousel-nav {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.carousel-dot.active {
    background: var(--white);
    transform: scale(1.3);
}

/* --- HOME PAGE CARDS --- */
.home-card {
    background: var(--white);
    border-radius: 24px;
    padding: 35px 50px 50px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.home-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 20px;
}

.home-card > p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin: 0 0 20px;
}

.home-card > p:last-of-type {
    margin-bottom: 0;
}

/* Feature grid inside cards */
.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.home-feature {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
}

.home-feature h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 10px;
}

.home-feature p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Card links */
.card-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 20px;
    transition: color 0.3s ease;
    position: relative;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.card-link:hover {
    color: #1f2d24;
}

.card-link:hover::after {
    width: 100%;
    left: 0;
}

/* Process card - title inside grid */
.process-card {
    padding: 0;
}

/* Process section with image */
.process-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.process-text-col {
    padding: 35px 0 50px 50px;
}

.process-text-col h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 20px;
}

.process-text-col > p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin: 0 0 25px;
}

.process-image-col {
    padding: 35px 50px 35px 0;
}

/* Compact feature list with icons */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.feature-text span {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.process-image-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 16px;
}

/* Contact form inside card */
.home-contact-form {
    margin-top: 25px;
}

.home-contact-form .contact-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.home-contact-form input,
.home-contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.home-contact-form input:focus,
.home-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.home-contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.home-contact-form .btn-main {
    margin-top: 15px;
}

/* Collection card */
.collection-card {
    padding-top: 35px;
    padding-bottom: 30px;
}

/* --- PRODUCT GRID (Consistent Sizes) --- */
.products-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin: 30px 0;
}

/* Products grid inside home card - reset margins */
.products-grid.home-products {
    margin: 30px 0 20px;
}

.product {
    background: var(--white); padding: 20px 15px; border-radius: 15px;
    text-align: center; border: 1px solid #eee; display: flex; flex-direction: column; align-items: center;
    transition: box-shadow 0.3s ease;
}
.product:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.product img { 
    width: 100%; 
    height: 150px; 
    object-fit: contain; 
    margin-bottom: 10px; 
    transition: transform 0.3s ease;
}
.product:hover img {
    transform: translateY(-8px);
}
.product h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}
.product > p {
    margin: 0 0 12px;
    color: #555;
}

.size-select, .btn-cart {
    width: 100%; max-width: 160px; height: 38px; border-radius: 4px;
    font-size: 0.85rem; margin-bottom: 10px; display: block;
}
.size-select { border: 1px solid #ccc; background: #fff; padding: 0 10px; }
.btn-cart { background: var(--primary-color); color: white; border: none; font-weight: 600; cursor: pointer; margin-bottom: 0; }

/* --- PROCESS SECTION --- */
#home-process .process-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 50px; align-items: center; margin: 30px 0 80px; }
#process-content .process-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 50px; align-items: center; margin: 60px 0; }
.process-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.process-text p { font-size: 1.15rem; line-height: 1.8; color: #444; margin: 0 0 20px; }
.process-bullets { list-style: none; padding: 0; margin: 20px 0 30px; text-align: left; }
.process-bullets li { margin-bottom: 12px; font-size: 1.05rem; line-height: 1.6; color: #444; }
.tech-link { 
    display: inline-block; 
    padding: 12px 30px; 
    border: 2px solid var(--primary-color); 
    border-radius: 8px; 
    color: var(--primary-color); 
    text-decoration: none; 
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, background 0.3s ease;
}

.tech-link:hover {
    background: var(--primary-color);
    color: var(--white);
}
.process-image-container { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: white; }
.process-img { width: 100%; height: auto; display: block; }

/* --- PAGE CONTENT (About, etc.) --- */
.page-content { text-align: center; margin: 60px 0; }
.page-content h1 { margin-bottom: 30px; }
.page-content p { font-size: 1.15rem; line-height: 1.8; max-width: 900px; margin: 20px auto; color: #444; }

/* --- ABOUT SECTION (Home) --- */
#home-about { margin-bottom: 30px; }
.about-text { font-size: 1.15rem; line-height: 1.8; color: #444; margin: 0; }

/* --- PAGE SECTIONS (About, Process, Contact) --- */
.page-section { margin: 30px 0 80px; }
.about-page { margin: 30px 0 80px; }

/* Content Cards */
.content-card, .about-card {
    background: var(--white);
    border-radius: 24px;
    padding: 50px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}
.content-card h2, .about-card h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0 0 20px;
}
.content-card p, .about-card p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    margin: 0 0 20px;
}
.content-card p:last-child, .about-card p:last-child { margin-bottom: 0; }
.content-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Highlights Grid */
.highlights-grid, .about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}
.highlights-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}
.highlight-item {
    background: var(--white);
    border-radius: 20px;
    padding: 35px 25px;
    box-shadow: var(--shadow);
    text-align: center;
}
.highlight-item h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin: 0 0 12px;
    font-weight: 700;
}
.about-highlights .highlight-item h3 {
    font-size: 2.5rem;
    margin: 0 0 10px;
}
.highlight-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}
.highlight-item a {
    color: var(--primary-color);
    text-decoration: none;
}
.highlight-item a:hover { text-decoration: underline; }

/* Contact Form in Card */
.contact-form input,
.contact-form textarea {
    margin-bottom: 15px;
}
.contact-form .btn-main {
    margin-top: 10px;
}

/* --- CONTACT FORM (Home) --- */
#home-contact { margin-top: 20px; padding-bottom: 80px; }
.contact-card { background: var(--white); border-radius: 24px; padding: 60px; box-shadow: var(--shadow); text-align: center; }
.contact-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 30px 0 20px; }
input, textarea { padding: 16px; border: 1px solid #e0e0e0; border-radius: 12px; width: 100%; box-sizing: border-box; font-size: 1rem; }
.btn-main { width: 100%; padding: 18px; background: var(--primary-color); color: white; border: none; border-radius: 12px; cursor: pointer; font-weight: 600; }

/* --- CONTACT PAGE --- */
.page-title-centered {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 30px 0;
}
#page-contact { margin-bottom: 80px; }
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}
.contact-info {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
}
.contact-info h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 0 0 15px;
}
.contact-info > p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
    margin: 0 0 30px;
}
.contact-details { margin-top: 20px; }
.contact-item { margin-bottom: 25px; }
.contact-item h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin: 0 0 8px;
    font-weight: 600;
}
.contact-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
}
.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}
.contact-item a:hover {
    text-decoration: underline;
}
.contact-form-container {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
}
.contact-form-container h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 0 0 25px;
}
.contact-form-container input,
.contact-form-container textarea {
    margin-bottom: 15px;
}
.contact-form-container .btn-main {
    margin-top: 10px;
}

/* --- AUTH MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--white);
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-dark); }
.modal-form h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin: 0 0 8px;
    text-align: center;
}
.modal-subtitle {
    text-align: center;
    color: #666;
    margin: 0 0 30px;
    font-size: 1rem;
}
.modal-form input {
    margin-bottom: 16px;
}
.btn-modal {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 10px;
    transition: background 0.2s;
}
.btn-modal:hover { background: #1f2d24; }
.modal-footer {
    text-align: center;
    margin: 25px 0 0;
    color: #666;
    font-size: 0.95rem;
}
.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.modal-footer a:hover { text-decoration: underline; }
.modal-form.hidden { display: none; }

/* Nav Auth Button Styles */
.nav-auth a {
    background: var(--primary-color);
    color: white !important;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.2s;
}
.nav-auth a:hover { background: #1f2d24; }

/* --- SHOPPING CART SIDEBAR --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100%;
    background: var(--white);
    z-index: 1600;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.cart-sidebar.active { right: 0; }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}
.cart-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-dark);
}
.cart-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.cart-close:hover { color: var(--text-dark); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-empty {
    text-align: center;
    color: #999;
    margin-top: 40px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: #f9f9f9;
    border-radius: 8px;
}
.cart-item-details {
    flex: 1;
}
.cart-item-details h4 {
    margin: 0 0 5px;
    font-size: 0.95rem;
    color: var(--text-dark);
}
.cart-item-size {
    margin: 0 0 5px;
    font-size: 0.8rem;
    color: #888;
}
.cart-item-price {
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: #f5f5f5; }
.qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}
.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}
.remove-item:hover { text-decoration: underline; }

.cart-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}
.btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-checkout:hover { background: #1f2d24; }

/* --- FOOTER --- */
#main-footer { background: var(--primary-color); color: #fff; text-align: center; padding: 5px 0; margin-top: auto; }
