/* css/style.css */
:root {
    --primary: #5A6944;        /* Soft Heritage Sage Green */
    --primary-light: #F4F6F0;  /* Pastel Sage Accent */
    --accent: #B0744D;         /* Earthy Terracotta */
    --dark: #20221E;           /* Deep Charcoal Text */
    --light: #FAF9F6;          /* Clean Organic Warm Linen background */
    --white: #FFFFFF;
    --border: #E8E7E3;
    --gray: #787E74;
    --success: #2E7D32;
    --radius: 12px;
    --shadow: 0 4px 18px rgba(32, 34, 30, 0.05);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--light);
    color: var(--dark);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
    padding: 2.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ==================== HEADER ==================== */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1;
}
.logo-sub {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 2px;
    margin-top: 4px;
}
.site-navigation {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
}
.cart-trigger {
    text-decoration: none;
    color: var(--white);
    background-color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}
.cart-trigger:hover {
    background-color: #495537;
}
.cart-badge {
    background-color: var(--accent);
    color: var(--white);
    font-size: 0.75rem;
    padding: 1px 7px;
    border-radius: 20px;
}

/* ==================== HERO SECTION ==================== */
.hero-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    min-height: 400px;
    margin-bottom: 3rem;
    border: 1px solid var(--border);
}
.hero-content {
    flex: 1;
    padding: 3rem;
}
.hero-tag {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 1.5rem;
}
.hero-description {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2rem;
}
.hero-img-box {
    flex: 1;
    height: 400px;
    background-size: cover;
    background-position: center;
}

/* ==================== FEATURE ITEMS ==================== */
.features-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}
.feature-card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
}
.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.feature-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ==================== PRODUCT GRID ==================== */
.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}
.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(32, 34, 30, 0.08);
}
.product-img-wrap {
    height: 260px;
    overflow: hidden;
    background-color: #F0EEE9;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}
.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}
.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}
.product-features {
    list-style: none;
    margin-top: auto;
}
.product-features li {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 4px;
    position: relative;
    padding-left: 14px;
}
.product-features li::before {
    content: '•';
    color: var(--accent);
    position: absolute;
    left: 0;
}

/* ==================== PRODUCT DETAILS PAGE ==================== */
.product-details-container {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
    margin-bottom: 3rem;
}
.details-image-panel {
    background-color: #F0EEE9;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.details-image-panel img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.details-info-panel {
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
}
.details-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.details-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.details-desc {
    color: var(--gray);
    margin-bottom: 2rem;
}
.option-selector-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.swatch-group {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
}
.swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--white);
    outline: 1px solid var(--border);
    transition: transform 0.2s, outline-color 0.2s;
}
.swatch:hover {
    transform: scale(1.1);
}
.swatch.active {
    outline: 2px solid var(--accent);
}
.swatch.red { background-color: #C0392B; }
.swatch.blue { background-color: #2980B9; }
.swatch.green { background-color: #27AE60; }
.swatch.white { background-color: #FAF9F6; outline: 1px solid #CCC; }
.swatch.black { background-color: #2C3E50; }

.action-row {
    margin-top: auto;
}
.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-primary:hover {
    background-color: #9C5D37;
}

/* ==================== CART PAGE ==================== */
.table-responsive {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 2rem;
}
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.custom-table th, .custom-table td {
    padding: 1.25rem 1.5rem;
}
.custom-table th {
    background-color: var(--primary-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}
.custom-table td {
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cart-product img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.cart-product-title {
    font-family: var(--font-heading);
    font-weight: 600;
}
.cart-product-meta {
    font-size: 0.8rem;
    color: var(--gray);
}
.remove-link {
    background: none;
    border: none;
    color: #C0392B;
    cursor: pointer;
    font-weight: 600;
}
.cart-summary-box {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}
.summary-card {
    background-color: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    width: 320px;
    box-shadow: var(--shadow);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.summary-row.total {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

/* ==================== CHECKOUT LAYOUT ==================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
}
.checkout-panel {
    background-color: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 2.5rem;
}
.checkout-panel h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-height: 240px;
    overflow-y: auto;
}
.order-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}
.order-item-row img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.order-item-details {
    flex-grow: 1;
}
.order-item-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

#rzp-button:disabled {
    background-color: var(--gray);
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== FOOTER ==================== */
.site-footer {
    background-color: var(--white);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 1.5rem;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
}
.footer-brand {
    max-width: 400px;
}
.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.footer-brand p {
    color: var(--gray);
}
.footer-contact h4 {
    margin-bottom: 1rem;
}
.footer-contact a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 0.5rem;
}
.footer-contact a:hover {
    color: var(--accent);
}
.footer-base {
    text-align: center;
    padding-top: 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media(max-width: 768px) {
    .hero-card { flex-direction: column; }
    .hero-img-box { width: 100%; height: 250px; }
    .product-details-container { grid-template-columns: 1fr; }
    .checkout-grid { grid-template-columns: 1fr; }
}