@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #2C1810;
    --primary-light: #4A2C1F;
    --secondary: #8B4513;
    --accent: #D4A373;
    --gold: #C5A059;
    --text-dark: #1A1A1A;
    --text-light: #F4F1EA;
    --bg-light: #FCFAF7;
    --bg-dark: #120C0A;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* Dynamic Variables */
    --bg-color: var(--bg-light);
    --text-color: var(--text-dark);
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --nav-link-color: var(--primary);
}

body.dark-theme {
    --bg-color: var(--bg-dark);
    --text-color: var(--text-light);
    --header-bg: rgba(18, 12, 10, 0.98);
    --card-bg: #1e1614;
    --nav-link-color: var(--text-light);
    --glass: rgba(0, 0, 0, 0.5);
    --glass-border: rgba(255, 255, 255, 0.15);
    --bg-light: var(--bg-dark);
    /* Override light sections in dark mode */
    --accent-dim: rgba(212, 163, 115, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
    transition: background-color 0.5s ease, color 0.5s ease;
    text-align: center;
    position: relative;
    /* Global center alignment */
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo {
    font-family: 'Playfair Display', serif;
    text-align: center;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navigation --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 0.6rem 0;
    background: var(--header-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--nav-link-color);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    opacity: 0.8;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    margin-left: 1.5rem;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--accent);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hide mobile auth links on desktop */
.nav-menu .mobile-auth-links {
    display: none;
}

/* --- Hero Section --- */
.hero {
    min-height: 60vh;
    height: auto;
    padding: 6rem 0;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--text-light);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero-content {
    max-width: 800px;
    z-index: 10;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease forwards;
    text-align: center;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
    text-align: center;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    border: none;
    line-height: 1;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--text-light);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 163, 115, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary);
    transform: translateY(-5px);
}

/* --- Sections --- */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header span {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 600;
}

.section-header h2 {
    font-size: 3rem;
    margin-top: 1rem;
    color: var(--text-color);
    text-align: center;
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 3rem;
}

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    border: 1px solid #eee;
    max-width: 100%;
    width: 100%;
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow);
}

.dark-theme .card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
}

.dark-theme .card h3 {
    color: var(--accent);
}

.dark-theme .card p {
    color: #bbb;
}

.card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    transition: var(--transition);
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card-content {
    padding: 2.5rem;
    text-align: center;
}

.card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-align: center;
}

.card-content p {
    color: #666;
    margin-bottom: 2.5rem;
}

/* --- Shop / Product Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.product-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.product-img {
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-img img {
    width: 100%;
    height: 100%;
}

.product-info {
    text-align: center;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.product-price {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.cta-box-section {
    padding: 2.5rem 0 0;
    /* Reduced top, removed bottom padding */
}

.cta-box {
    background: var(--primary);
    border-radius: 30px;
    padding: 4rem 3rem;
    color: var(--text-light);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.dark-theme .cta-box {
    background: var(--primary-light);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 163, 115, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.cta-box p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    /* Standardized to match hero */
    opacity: 0.8;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    /* Prevent text from being too wide */
}

/* --- Tutorials --- */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .tutorial-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    }
}

@media (max-width: 768px) {
    .tutorial-grid {
        grid-template-columns: 1fr;
    }
}

.tutorial-grid .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tutorial-grid .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tutorial-grid .card-content p {
    flex-grow: 1;
}

.tutorial-grid .btn {
    margin-top: auto;
    align-self: center;
}

.tutorial-card .card-img {
    height: 180px;
}

.dark-theme #beginner-guides,
.dark-theme #our-workshop,
.dark-theme #our-team,
.dark-theme #our-community,
.dark-theme #location,
.dark-theme #materials-section,
.dark-theme #contact-intro,
.dark-theme #location-section {
    background-color: var(--bg-dark) !important;
}

.dark-theme .contact-info-item h4 {
    color: var(--accent) !important;
}

.dark-theme .contact-info-item p {
    color: var(--text-light) !important;
}

.dark-theme .contact-info-item i {
    color: var(--accent) !important;
}

.dark-theme .section-header h2 {
    color: var(--text-light) !important;
}

.dark-theme .section-header span {
    color: var(--accent) !important;
}

/* --- About Section --- */
.about-section {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .about-section {
        flex-direction: row;
    }
}

.about-text {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Ensures buttons/flex children are centered */
}

.about-img {
    flex: 1;
    position: relative;
    max-width: 500px;
    /* Restrict width */
    margin: 0 auto;
}

.about-img img {
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-height: 300px;
    /* Restrict height */
    width: 100%;
    object-fit: cover;
    max-width: 400px;
}

.about-img::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: calc(100% - 1rem);
    height: calc(100% - 1rem);
    border: 2px solid var(--accent);
    border-radius: 20px;
    z-index: -1;
}

@media (min-width: 1024px) {
    .about-img::after {
        top: 2rem;
        left: 2rem;
        width: 100%;
        height: 100%;
    }
}

/* --- Contact Section --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: #fff;
    padding: 4rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.dark-theme .contact-container {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-direction: column;
    /* Stack for centered look */
    text-align: center;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 0.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.1);
}

.dark-theme .form-group label {
    color: var(--text-light);
}

.dark-theme .form-group input,
.dark-theme .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    color: var(--text-light);
}

/* --- Footer --- */
footer {
    background: var(--primary);
    color: var(--text-light);
    padding: 6rem 0 2rem;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
    text-align: center;
}

.footer-col form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.footer-logo i {
    font-size: 1.6rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    text-align: center;
}

.footer-links {
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: center;
    /* Center list items if they are flex */
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 0;
    transform: translateY(-2px);
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* --- Contact Form Button Centering --- */
.contact-form button {
    display: block;
    margin: 0 auto;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s ease-out;
}

.zoom-in.active {
    opacity: 1;
    transform: scale(1);
}

.pulse-anim {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Layout Helpers */
@media (min-width: 1024px) {
    .row-reverse {
        flex-direction: row-reverse;
    }
}

.bg-alt {
    background-color: #f5f1eb;
    /* Subtle earthy tone */
}

/* Materials Section Grid Stacking */
.materials-grid-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.materials-grid-section .about-text,
.materials-grid-section .about-img {
    width: 100%;
    flex: none;
    max-width: 600px;
}

@media (min-width: 1024px) {
    .materials-grid-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "img header"
            "img content";
        gap: 1rem 4rem;
        align-items: center;
        text-align: left;
        max-width: 1300px;
    }

    .materials-grid-section .img-part {
        grid-area: img;
    }

    .materials-grid-section .header-part {
        grid-area: header;
        align-self: end;
        padding-bottom: 0.5rem;
    }

    .materials-grid-section .content-part {
        grid-area: content;
        align-self: start;
        padding-top: 0.5rem;
    }

    .materials-grid-section .header-part h3,
    .materials-grid-section .content-part p {
        text-align: left;
        margin-left: 0;
        margin-right: auto;
    }

    .materials-grid-section .content-part .btn {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: var(--header-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 30px 1.5rem 1rem;
        transition: 0.5s;
        overflow: hidden;
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        gap: 0 !important;
    }

    section,
    footer,
    .container {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Join CTA Section & Footer Padding for Tablets */
    .cta-box-section,
    .cta-section,
    footer {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    .dark-theme .nav-menu {
        background: var(--bg-dark);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        margin: 0;
        border: none !important;
    }

    .nav-link {
        color: var(--text-color) !important;
        font-size: 0.9rem;
        display: block;
        padding: 0.25rem 1rem;
        border: none !important;
    }

    .hamburger {
        display: block;
        z-index: 1001;
        margin-left: 0.8rem;
    }

    .auth-nav {
        display: none !important;
    }

    .theme-toggle {
        display: flex;
        width: 36px;
        height: 36px;
        font-size: 1rem;
        /* sits naturally to the left of .hamburger via DOM order */
        margin-left: 0;
        margin-right: 0.25rem;
        flex-shrink: 0;
    }

    .hero {
        padding-top: 7rem !important;
    }

    .hero-btns {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero-btns .btn {
        min-width: 200px;
        flex: 1;
        max-width: 250px;
    }

    .nav-menu .mobile-auth-links {
        display: flex !important;
        flex-direction: row;
        gap: 0.8rem;
        margin-top: 0.3rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--glass-border);
        width: 100%;
        justify-content: center;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nav-menu .mobile-auth-links a {
        flex: 1;
        max-width: 140px;
        padding: 0.5rem;
        border-radius: 12px;
        font-weight: 600;
        text-align: center;
        transition: var(--transition);
        font-size: 0.85rem;
    }

    .nav-menu .mobile-auth-links .btn-nav-login {
        border: 1px solid var(--accent);
        color: var(--accent);
    }

    .nav-menu .mobile-auth-links .btn-nav-signup {
        background: var(--accent);
        color: var(--primary);
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }

    /* Responsive card grids for tablets */
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
        gap: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }

    /* Responsive about image for tablets */
    .about-img img {
        max-height: 280px;
        max-width: 100%;
        width: 100%;
        object-fit: cover;
    }

    .about-img {
        max-width: 100%;
        flex: 1;
    }

    /* Responsive Meet the Craftsmen section for tablets */
    #our-team .about-section {
        flex-direction: column !important;
        text-align: center;
    }

    #our-team .about-section .about-img {
        order: 2;
        margin: 2rem 0;
    }

    #our-team .about-section .about-text {
        order: 3;
        text-align: center;
    }

    #our-team .section-header {
        order: 1;
        text-align: center;
    }
}

/* Vertical Spacing for Buttons (All Views) */
.about-text p,
.hero-content p,
.cta-box p,
.section-header p {
    margin-bottom: 2rem;
}

/* Desktop and Tablet layout for better text readability */
@media (min-width: 769px) {

    .about-text p,
    .hero-content p,
    .section-header p,
    .cta-box p {
        max-width: 550px;
        margin-left: auto !important;
        margin-right: auto !important;
        line-height: 1.8;
        text-align: center;
    }
}

/* Tablet specific styles */
@media (max-width: 768px) {
    .footer-col {
        padding: 0 1rem;
    }

    .footer-grid {
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .auth-nav {
        display: none !important;
    }

    .hero {
        min-height: 40vh;
        padding: 8rem 0 4rem 0 !important;
    }

    .hero-content h1 {
        font-size: 3.5rem;
        margin-top: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-btns .btn {
        width: 100%;
        max-width: 280px;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .cta-box h2 {
        font-size: 2.5rem;
    }

    /* Mobile Image Resizing */
    .card-img {
        height: 180px;
    }

    .product-img {
        height: 160px;
    }

    .about-img img {
        max-height: 250px;
        max-width: 100%;
        width: 100%;
        object-fit: cover;
    }

    .about-img {
        max-width: 100%;
        flex: 1;
    }

    .tutorial-card .card-img {
        height: 180px;
    }

    /* Responsive card grids */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-width: 300px;
    }

    /* Prevent horizontal scroll on mobile */
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 1rem;
    }

    /* Responsive Meet the Craftsmen section */
    #our-team .about-section {
        flex-direction: column !important;
        text-align: center;
    }

    #our-team .about-section .about-img {
        order: 2;
        margin: 2rem 0;
    }

    #our-team .about-section .about-text {
        order: 3;
        text-align: center;
    }

    #our-team .section-header {
        order: 1;
        text-align: center;
    }

    .footer-col {
        padding: 0 1.5rem;
    }

    .footer-col form {
        width: 100%;
        max-width: 400px;
        margin: 2rem auto 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .footer-col input {
        width: 100%;
        min-width: 0;
    }

    .footer-col form button {
        width: auto;
        align-self: center;
        padding: 0.8rem 2rem;
        font-size: 0.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        margin-bottom: 7rem;
    }

    .footer-bottom {
        padding-top: 3rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .contact-container {
        padding: 1.5rem 1rem;
    }

    .nav-menu {
        max-width: 280px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-bottom: 5rem;
    }

    .footer-col form {
        max-width: 100%;
    }

    .auth-nav {
        display: none !important;
    }

    .hero {
        padding: 7rem 0 3rem 0 !important;
    }

    .hero-content h1 {
        font-size: 2.8rem;
        margin-top: 0.5rem;
    }

    /* Responsive card grids for small mobile */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-content {
        padding: 2rem;
    }

    .card-content h3 {
        font-size: 1.6rem;
    }

    /* Responsive about image for small mobile */
    .about-img img {
        max-height: 200px;
        max-width: 100%;
        width: 100%;
        object-fit: cover;
    }

    .about-img {
        max-width: 100%;
        flex: 1;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.7rem 0.8rem;
    }

    .nav-menu .mobile-auth-links a {
        font-size: 0.95rem;
        padding: 0.8rem 1.2rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hamburger span {
        width: 22px;
    }

    /* Responsive Meet the Craftsmen section for small mobile */
    #our-team .about-section {
        flex-direction: column !important;
        text-align: center;
    }

    #our-team .about-section .about-img {
        order: 2;
        margin: 2rem 0;
    }

    #our-team .about-section .about-text {
        order: 3;
        text-align: center;
    }

    #our-team .section-header {
        order: 1;
        text-align: center;
    }
}

/* --- Auth Pages --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 2rem 2rem;
    background: var(--bg-light);
}

.auth-logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-logo-section .logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-logo-section .logo i {
    font-size: 2rem;
}

.auth-container {
    background: #fff;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
    animation: fadeInUp 0.8s ease;
}

.dark-theme .auth-container {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.dark-theme .auth-header h2 {
    color: var(--accent);
}

.auth-header p {
    color: #666;
}

.dark-theme .auth-header p {
    color: #bbb;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 3.5rem !important;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: #666;
    transition: var(--transition);
    font-size: 1.2rem;
}

.toggle-password:hover {
    color: var(--accent);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.auth-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password {
    color: var(--accent);
    font-weight: 500;
}

.social-login {
    margin-top: 2rem;
    text-align: center;
}

.social-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #999;
}

.dark-theme .social-divider {
    color: #666;
}

.social-divider::before,
.social-divider::after {
    content: '';
    height: 1px;
    background: #eee;
    flex: 1;
}

.dark-theme .social-divider::before,
.dark-theme .social-divider::after {
    background: var(--glass-border);
}

.social-btns {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-weight: 500;
    font-size: 0.95rem;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.dark-theme .social-btn {
    background: var(--card-bg);
    border-color: var(--glass-border);
    color: var(--text-light);
}

.social-btn:hover {
    background: #f8f8f8;
    border-color: var(--accent);
    transform: translateY(-3px);
}

.dark-theme .social-btn:hover {
    background: var(--glass);
    border-color: var(--accent);
}

.social-btn i {
    font-size: 1.2rem;
}

.social-btn.google i {
    color: #DB4437;
}

.social-btn.facebook i {
    color: #4267B2;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #666;
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
}

/* --- Theme Toggle --- */
.theme-toggle {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent);
    font-size: 1.1rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--accent);
    color: var(--primary);
    transform: rotate(360deg);
}

.auth-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-left: 1rem;
}

.btn-nav-login {
    color: var(--nav-link-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-nav-signup {
    padding: 0.7rem 1.8rem;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-nav-signup:hover {
    background: var(--text-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.dark-theme .auth-options label {
    color: #bbb !important;
}

.dark-theme .auth-header p,
.dark-theme .auth-footer,
.dark-theme .auth-footer p {
    color: #bbb !important;
}

.dark-theme .auth-header h2 {
    color: var(--accent) !important;
}

/* Background overrides for sections with inline bg-alt color */
.dark-theme .bg-alt {
    background-color: #140e0c !important;
}

.dark-theme .product-card h3 {
    color: var(--accent) !important;
}

.dark-theme .product-price {
    color: var(--gold) !important;
}

/* Fix for buttons that might have hardcoded dark text */
.dark-theme .btn-primary {
    color: var(--primary) !important;
    background: var(--accent) !important;
}

.dark-theme .btn-secondary {
    color: var(--text-light) !important;
    border-color: var(--text-light) !important;
}

.dark-theme .btn-secondary:hover {
    background: var(--text-light) !important;
    color: var(--primary) !important;
}

/* Ensure all p and span with hardcoded #666 or #999 are visible */
.dark-theme p[style*="color: #666"],
.dark-theme p[style*="color: #999"],
.dark-theme div[style*="color: #666"],
.dark-theme span[style*="color: #999"],
.dark-theme label[style*="color: #555"] {
    color: #bbb !important;
}

.dark-theme p[style*="color: #ccc"] {
    color: #eee !important;
}

.dark-theme i[style*="color: #000"] {
    color: var(--text-light) !important;
}

/* Responsive auth */
@media (max-width: 480px) {
    .auth-container {
        padding: 2rem 1.5rem;
    }
}

/* 360px Responsive Fixes */
@media (max-width: 360px) {
    .container {
        padding: 0 0.8rem;
    }

    .footer-logo {
        font-size: 1.6rem;
        gap: 0.6rem;
    }

    .footer-col {
        padding: 0 0.5rem;
    }

    .footer-col p {
        font-size: 0.85rem;
        line-height: 1.6;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-col h4 {
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }

    .footer-col form {
        gap: 0.6rem;
    }

    .footer-col form button {
        width: 100%;
        max-width: 150px;
        padding: 0.7rem 1.2rem;
    }
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
    font-size: 1.2rem;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
    color: var(--accent);
    transform: translateY(-5px);
}

/* --- Logo Styling --- */
.logo {
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.4rem;
}

/* --- Social Icons Custom --- */
.social-icon {
    font-size: 1.5rem;
    color: var(--primary);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: transparent;
}

.social-icon:hover {
    color: var(--accent);
    transform: scale(1.2);
    background: rgba(212, 163, 115, 0.15);
}

.dark-theme .social-icon {
    color: var(--text-light);
}

.dark-theme .social-icon:hover {
    color: var(--accent);
}