/* --- CSS VARIABLES (Color Palette) --- */
:root {
    --primary-blue: #275477; /* The exact color you uploaded */
    --primary-hover: #1b3d58; /* Darker shade for hover effects */
    --wood-brown: #a06b3c;
    --dark-gray: #333333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --soft-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-gray);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

/* --- STICKY HEADER / NAVBAR --- */
.navbar {
    background-color: var(--primary-blue);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
}

.nav-links a:hover {
    background-color: var(--primary-hover);
}

.nav-icons a {
    color: var(--white);
    font-size: 18px;
    margin-left: 15px;
}

/* --- BUTTONS --- */
.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--wood-brown);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
}
.btn-secondary:hover {
    opacity: 0.9;
}

/* --- FOOTER --- */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: auto; /* Pushes footer to bottom */
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto auto 20px auto;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--wood-brown);
}

.footer-section a {
    color: #ddd;
    display: block;
    margin-bottom: 8px;
}
.footer-section a:hover {
    color: var(--white);
}
/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(39, 84, 119, 0.8), rgba(39, 84, 119, 0.8)), url('https://images.unsplash.com/photo-1555041469-a586c61ea9bc?auto=format&fit=crop&w=1920&q=80') center/cover;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- SECTION TITLES --- */
.section-title {
    text-align: center;
    margin: 50px 0 30px;
    font-size: 2rem;
    color: var(--primary-blue);
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--wood-brown);
    display: block;
    margin: 10px auto;
    border-radius: 2px;
}

/* --- CATEGORIES GRID --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background-color: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 4px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--wood-brown);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

/* --- PRODUCT CARDS --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.3rem;
    color: var(--wood-brown);
    font-weight: 700;
    margin-bottom: 15px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}
/* --- AUTHENTICATION FORMS --- */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary-blue);
}

.auth-container h2 {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 5px rgba(39, 84, 119, 0.3);
}

.alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}
.alert-error { background: #fee2e2; color: #dc2626; border: 1px solid #f87171; }
.alert-success { background: #dcfce7; color: #16a34a; border: 1px solid #4ade80; }

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
}
.auth-links a { color: var(--wood-brown); font-weight: 600; }
.auth-links a:hover { color: var(--primary-blue); }
/* --- PASSWORD INPUT WRAPPER --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 40px; /* Make room for the icon */
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: var(--primary-blue);
    font-size: 1.1rem;
    transition: 0.3s;
}

.toggle-password:hover {
    color: var(--wood-brown);
}
/* --- SHOP FILTERS --- */
.shop-header {
    text-align: center;
    margin: 40px 0 20px;
}

.shop-header h1 {
    color: var(--primary-blue);
    font-size: 2.5rem;
}

.filter-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--white);
    color: var(--dark-gray);
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-weight: 500;
    transition: 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #64748b;
    grid-column: 1 / -1; /* Spans across the entire grid */
}
/* --- SHOPPING CART STYLE --- */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.cart-items {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--soft-shadow);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th, .cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.cart-table th {
    color: var(--primary-blue);
    font-weight: 600;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-qty-input {
    width: 60px;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    text-align: center;
}

.btn-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
}
.btn-remove:hover { color: #b91c1c; }

/* Cart Summary Card */
.cart-summary {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--soft-shadow);
    height: fit-content;
}

.cart-summary h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--wood-brown);
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

/* Responsive Cart */
@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}
/* --- CHECKOUT STYLES --- */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.checkout-form-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--soft-shadow);
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.payment-radio {
    display: none; /* Hide real radio button */
}

.payment-label {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    display: block;
    font-weight: 600;
    transition: 0.3s;
}

.payment-radio:checked + .payment-label {
    border-color: var(--primary-blue);
    background-color: rgba(39, 84, 119, 0.05);
    color: var(--primary-blue);
}

/* Success Card */
.success-card {
    max-width: 600px;
    margin: 80px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #16a34a;
    margin-bottom: 20px;
}

.pin-display {
    background: var(--light-bg);
    border: 2px dashed var(--wood-brown);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 5px;
    padding: 15px;
    border-radius: 8px;
    color: var(--primary-blue);
    margin: 20px 0;
    display: inline-block;
}
/* --- PRODUCT DETAILS & PREMIUM GALLERY --- */
.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

/* Gallery Layout: Thumbnails on the left, Main image on the right */
.gallery-container {
    display: flex;
    gap: 15px;
    height: 480px;
}

.thumbnail-strip {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    width: 90px;
    padding-right: 5px;
}

/* Custom Scrollbar for Vertical Thumbnails */
.thumbnail-strip::-webkit-scrollbar { width: 4px; }
.thumbnail-strip::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.thumb-item {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: 0.2s;
}

.thumb-item:hover, .thumb-item.active {
    border-color: var(--primary-blue);
    transform: scale(1.03);
}

/* High-Performance Hover Zoom Container */
.main-preview-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: zoom-in;
    height: 100%;
}

.main-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s ease;
    transform-origin: center center;
}

/* Zoom Magnifier Overlay Button */
.lightbox-trigger {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-blue);
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 10;
}
.lightbox-trigger:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* --- LIGHTBOX FULLSCREEN MODAL --- */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-modal.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 25px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.3s;
}
.lightbox-close:hover { color: #fca5a5; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .details-grid { grid-template-columns: 1fr; }
    .gallery-container {
        flex-direction: column-reverse; /* Thumbnails go below main on mobile */
        height: auto;
    }
    .thumbnail-strip {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
    }
    .main-preview-container { height: 350px; }
}