/* ============================================================
   BYOC - Main Stylesheet
   Buy Your Own Choice
   Design: White primary, Black secondary, Green/Yellow accents
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
    /* Colors */
    --white: #FFFFFF;
    --black: #1A1A1A;
    --black-light: #2D2D2D;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --accent-green: #A8D5BA;
    --accent-green-dark: #7EC89A;
    --accent-yellow: #F5E6A3;
    --accent-yellow-dark: #E8D580;
    --danger: #E57373;
    --danger-dark: #D32F2F;
    --success: #81C784;
    --info: #64B5F6;

    /* Theme-specific colors */
    --navbar-bg: #F2F8F3;
    --footer-bg: #F0F6F1;
    --btn-hover-bg: #FDE68A;
    --btn-hover-color: #1A1A1A;
    --btn-hover-border: #FDE68A;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

[data-theme="dark"] {
    /* Colors */
    --white: #121212;
    --black: #F5F5F5;
    --black-light: #E0E0E0;
    --gray-50: #1A1A1A;
    --gray-100: #1E1E1E;
    --gray-200: #2D2D2D;
    --gray-300: #333333;
    --gray-400: #424242;
    --gray-500: #616161;
    --gray-600: #9E9E9E;
    --gray-700: #BDBDBD;
    --gray-800: #E0E0E0;

    /* Theme-specific colors */
    --navbar-bg: #161E19;
    --footer-bg: #141C17;
    --btn-hover-bg: #FBBF24;
    --btn-hover-color: #121212;
    --btn-hover-border: #FBBF24;
    --accent-green-dark: #6EE7B7;
    --accent-green: #6EE7B7;
    
    /* Shadows - softer for dark mode */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.7);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
}

body {
    font-family: var(--font-family);
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--black);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gray-600);
}

img {
    max-width: 100%;
    height: auto;
}

/* Global SVG Icon */
.tn-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.tn-navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.tn-navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.tn-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--black);
    letter-spacing: -0.5px;
    padding: 0;
}

.tn-navbar .navbar-brand span {
    color: var(--accent-green-dark);
}

/* Brand Logo - Light/Dark theme switching */
.brand-logo { border-radius: 4px; height: 65px; width: auto; }
.brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: inline-block; }

.tn-navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-700);
    padding: 0.75rem 1rem !important;
    transition: color var(--transition-fast);
    position: relative;
}

.tn-navbar .nav-link:hover,
.tn-navbar .nav-link.active {
    color: var(--black);
}

.tn-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--black);
    border-radius: 1px;
}

.tn-nav-search {
    position: relative;
    max-width: 300px;
}

.tn-nav-search input {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.85rem;
    width: 100%;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--gray-50);
}

.tn-nav-search input:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.05);
    background: var(--white);
}

.tn-nav-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.tn-cart-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-top: 4px; /* to prevent top badge cutoff */
}

.tn-cart-badge .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--black);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.tn-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.tn-hero .carousel-item {
    height: 480px;
}

.tn-hero .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.tn-hero .carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
    text-align: left;
    max-width: 600px;
}

.tn-hero .carousel-caption h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tn-hero .carousel-caption p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-tn-primary {
    background: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
    border-radius: var(--radius-md);
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-tn-primary:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
    border-color: var(--btn-hover-border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn.is-added,
.btn-tn-icon.is-added {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--black);
}

.btn-tn-secondary {
    background: var(--white);
    color: var(--black);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-tn-secondary:hover {
    border-color: var(--black);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-tn-accent {
    background: var(--accent-green);
    color: var(--black);
    border: 2px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn-tn-accent:hover {
    background: var(--accent-green-dark);
    border-color: var(--accent-green-dark);
    transform: translateY(-1px);
}

.btn-tn-danger {
    background: transparent;
    color: var(--danger-dark);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-tn-danger:hover {
    background: var(--danger-dark);
    color: var(--white);
    border-color: var(--danger-dark);
}

.btn-tn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.btn-tn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-tn-icon:hover {
    background: var(--black);
    color: var(--white);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.tn-section {
    padding: var(--space-3xl) 0;
}

.tn-section-header {
    margin-bottom: var(--space-xl);
}

.tn-section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.tn-section-header p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.tn-section-header .section-line {
    width: 40px;
    height: 3px;
    background: var(--black);
    border-radius: 2px;
    margin-top: 0.5rem;
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.tn-product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tn-product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.tn-product-card .card-img-wrapper {
    position: relative;
    padding: var(--space-lg);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    overflow: hidden;
}

.tn-product-card .card-img-wrapper img {
    max-height: 180px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.tn-product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.tn-product-card .card-actions {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    opacity: 0;
    transform: translateX(10px);
    transition: all var(--transition-normal);
}

.tn-product-card:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
}

.tn-product-card .card-body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tn-product-card .card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.tn-product-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tn-product-card .card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--space-sm);
}

.tn-product-card .card-rating .stars {
    color: #FFC107;
    font-size: 0.8rem;
}

.tn-product-card .card-rating .rating-text {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.tn-product-card .card-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
    margin-top: auto;
}

.tn-product-card .card-footer-actions {
    padding: var(--space-sm) var(--space-md) var(--space-md);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    align-items: center;
}

/* Stock badges */
.tn-stock-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: 2px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

.tn-stock-badge.in-stock {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid var(--accent-green);
}

.tn-stock-badge.low-stock {
    background: #FFF8E1;
    color: #F57F17;
    border: 1px solid var(--accent-yellow);
}

.tn-stock-badge.out-of-stock {
    background: #FFEBEE;
    color: var(--danger-dark);
    border: 1px solid var(--danger);
}

/* ============================================================
   PRODUCT DETAILS PAGE
   ============================================================ */
.tn-product-detail {
    padding: var(--space-2xl) 0;
}

.tn-product-detail .product-image {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.tn-product-detail .product-image img {
    max-height: 350px;
    object-fit: contain;
}

.tn-product-detail .product-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.tn-product-detail .product-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--black);
    margin: var(--space-md) 0;
}

.tn-product-detail .product-desc {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.tn-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.tn-specs-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.tn-specs-table td:first-child {
    font-weight: 600;
    color: var(--gray-700);
    width: 40%;
}

/* ============================================================
   FORMS (Login, Register, Checkout)
   ============================================================ */
.tn-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    padding: var(--space-xl);
}

.tn-auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 440px;
}

.tn-auth-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-xs);
}

.tn-auth-card .auth-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
}

.tn-form-group {
    margin-bottom: var(--space-md);
}

.tn-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-xs);
}

.tn-form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--white);
    color: var(--black);
}

.tn-form-control:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.06);
}

.tn-form-control::placeholder {
    color: var(--gray-400);
}

select.tn-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23757575' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============================================================
   CART & WISHLIST
   ============================================================ */
.tn-cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    background: var(--white);
    transition: box-shadow var(--transition-fast);
}

.tn-cart-item:hover {
    box-shadow: var(--shadow-sm);
}

.tn-cart-item .cart-item-img {
    width: 100px;
    height: 100px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tn-cart-item .cart-item-img img {
    max-height: 80px;
    object-fit: contain;
}

.tn-cart-item .cart-item-info {
    flex: 1;
}

.tn-cart-item .cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.tn-cart-item .cart-item-price {
    font-weight: 700;
    font-size: 1.1rem;
}

.tn-quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.tn-quantity-control button {
    width: 34px;
    height: 34px;
    border: none;
    background: var(--gray-50);
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tn-quantity-control button:hover {
    background: var(--gray-200);
}

.tn-quantity-control .qty-value {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-left: 1px solid var(--gray-300);
    border-right: 1px solid var(--gray-300);
    padding: 6px;
}

/* Cart Summary */
.tn-cart-summary {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 100px;
}

.tn-cart-summary h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--gray-300);
}

.tn-cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    font-size: 0.9rem;
}

.tn-cart-summary .summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 2px solid var(--black);
    margin-top: var(--space-sm);
    padding-top: var(--space-md);
}

/* ============================================================
   ORDERS
   ============================================================ */
.tn-order-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--white);
    transition: box-shadow var(--transition-fast);
}

.tn-order-card:hover {
    box-shadow: var(--shadow-sm);
}

.tn-order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--gray-200);
}

.tn-order-card .order-id {
    font-weight: 700;
    font-size: 1rem;
}

.tn-status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tn-status-badge.pending { background: #FFF3E0; color: #E65100; }
.tn-status-badge.confirmed { background: #E3F2FD; color: #1565C0; }
.tn-status-badge.packed { background: #F3E5F5; color: #7B1FA2; }
.tn-status-badge.shipped { background: rgba(245, 230, 163, 0.3); color: #F57F17; }
.tn-status-badge.delivered { background: rgba(168, 213, 186, 0.3); color: #2E7D32; }
.tn-status-badge.cancelled { background: #FFEBEE; color: #C62828; }

/* Order Filter Tabs */
.tn-order-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0;
}

.tn-order-tab {
    background: none;
    border: none;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    font-family: var(--font-family);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tn-order-tab:hover {
    color: var(--black);
}

.tn-order-tab.active {
    color: var(--black);
    border-bottom-color: var(--black);
}

.tn-order-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: var(--gray-200);
    color: var(--gray-700);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
    padding: 0 5px;
}

.tn-order-tab.active .tab-count {
    background: var(--black);
    color: var(--white);
}

/* Cancel Button */
.btn-tn-cancel {
    background: transparent;
    color: var(--danger-dark);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-tn-cancel:hover {
    background: var(--danger-dark);
    color: var(--white);
    border-color: var(--danger-dark);
}

/* Cancelled timeline override */
.tn-timeline.cancelled::before {
    background: var(--danger);
}

.tn-timeline.cancelled .tn-timeline-step .step-dot {
    background: var(--danger);
}

.tn-timeline.cancelled .tn-timeline-step .step-label {
    color: var(--danger-dark);
}

/* Order Timeline */
.tn-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: var(--space-xl) 0;
    padding: 0 var(--space-md);
}

.tn-timeline::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--gray-300);
}

.tn-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.tn-timeline-step .step-dot {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    font-size: 0.7rem;
    color: var(--white);
    transition: all var(--transition-normal);
}

.tn-timeline-step.completed .step-dot {
    background: var(--accent-green-dark);
}

.tn-timeline-step.active .step-dot {
    background: var(--black);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.15);
}

.tn-timeline-step .step-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
}

.tn-timeline-step.completed .step-label,
.tn-timeline-step.active .step-label {
    color: var(--black);
}

/* ============================================================
   PROFILE
   ============================================================ */
.tn-profile-header {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.tn-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================================
   SETUP BUILDER
   ============================================================ */
.tn-setup-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    height: 300px;
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.tn-setup-card:hover {
    transform: translateY(-6px);
}

.tn-setup-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.tn-setup-card:hover img {
    transform: scale(1.08);
}

.tn-setup-card .setup-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    color: var(--white);
}

.tn-setup-card .setup-overlay h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tn-setup-card .setup-overlay p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ============================================================
   PRODUCT UPDATES
   ============================================================ */
.tn-update-card {
    border-left: 3px solid var(--gray-300);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--white);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all var(--transition-fast);
}

.tn-update-card:hover {
    border-left-color: var(--black);
    box-shadow: var(--shadow-sm);
}

.tn-update-card.new-product { border-left-color: var(--accent-green-dark); }
.tn-update-card.price-update { border-left-color: #FFC107; }
.tn-update-card.spec-update { border-left-color: var(--info); }
.tn-update-card.restock { border-left-color: #AB47BC; }

.tn-update-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}

.tn-update-type.new-product { background: rgba(168,213,186,0.2); color: #2E7D32; }
.tn-update-type.price-update { background: #FFF8E1; color: #F57F17; }
.tn-update-type.spec-update { background: #E3F2FD; color: #1565C0; }
.tn-update-type.restock { background: #F3E5F5; color: #7B1FA2; }

/* ============================================================
   ADMIN PAGES
   ============================================================ */
.tn-admin-layout {
    display: flex;
    min-height: 100vh;
}

.tn-admin-sidebar {
    width: 260px;
    background: var(--white);
    color: var(--black);
    padding: var(--space-lg) 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1001;
}

.tn-admin-sidebar .sidebar-brand {
    padding: 0 var(--space-lg) var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: var(--space-md);
}

.tn-admin-sidebar .sidebar-brand h4 {
    font-weight: 800;
    font-size: 1.2rem;
}

.tn-admin-sidebar .sidebar-brand span {
    color: var(--accent-green);
}

.tn-admin-sidebar .sidebar-brand small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.tn-admin-sidebar .nav-link {
    color: var(--gray-600);
    padding: 0.75rem var(--space-lg);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.tn-admin-sidebar .nav-link:hover {
    color: var(--black);
    background: var(--gray-50);
}

.tn-admin-sidebar .nav-link.active {
    color: var(--black);
    background: var(--gray-100);
    border-left-color: var(--accent-green);
}

.tn-admin-content {
    margin-left: 260px;
    padding: var(--space-xl);
    flex: 1;
    background: var(--gray-50);
    min-height: 100vh;
}

/* Admin Stats Cards */
.tn-stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-fast);
}

.tn-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tn-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.tn-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--black);
}

.tn-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Tables */
.tn-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tn-table th {
    background: var(--gray-50);
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}

.tn-table td {
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
}

.tn-table tbody tr:hover {
    background: var(--gray-50);
}

.tn-table .product-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tn-table .product-cell img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
}

/* ============================================================
   FOOTER
   ============================================================ */
.tn-footer {
    background: var(--footer-bg);
    color: var(--gray-700);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
    transition: background-color var(--transition-normal);
}

.tn-footer h5 {
    color: var(--black);
    font-weight: 700;
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.tn-footer a {
    color: var(--gray-600);
    font-size: 0.85rem;
    display: block;
    padding: 3px 0;
    transition: color var(--transition-fast);
}

.tn-footer a:hover {
    color: var(--black);
}

.tn-footer .footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: var(--space-sm);
}

.tn-footer .footer-brand span {
    color: var(--accent-green);
}

.tn-footer .footer-tagline {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
}

.tn-footer-bottom {
    border-top: 1px solid var(--gray-300);
    padding-top: var(--space-lg);
    margin-top: var(--space-xl);
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* ============================================================
   ALERTS & TOASTS
   ============================================================ */
.tn-alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tn-alert-success {
    background: rgba(168,213,186,0.15);
    color: #2E7D32;
    border: 1px solid var(--accent-green);
}

.tn-alert-error {
    background: rgba(229,115,115,0.1);
    color: var(--danger-dark);
    border: 1px solid var(--danger);
}

.tn-alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid var(--info);
}

.tn-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--black);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform var(--transition-normal);
}

.tn-toast.show {
    transform: translateX(0);
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.tn-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    flex-wrap: wrap;
}

.tn-filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tn-filter-pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--white);
    text-decoration: none;
}

.tn-filter-pill:hover,
.tn-filter-pill.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* ============================================================
   COUPON DISPLAY
   ============================================================ */
.tn-coupon-card {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    margin-bottom: var(--space-sm);
}

.tn-coupon-card .coupon-code {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
}

.tn-coupon-card .coupon-discount {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.tn-empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--gray-500);
}

.tn-empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.tn-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.tn-empty-state p {
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

/* ============================================================
   REVIEW SECTION
   ============================================================ */
.tn-review {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--gray-200);
}

.tn-review .review-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.tn-review .review-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.tn-review .review-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.tn-review .review-stars {
    color: #FFC107;
    font-size: 0.8rem;
}

.tn-review .review-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.tn-page-header {
    background: var(--gray-50);
    padding: var(--space-2xl) 0;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--gray-200);
}

.tn-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.tn-page-header .breadcrumb {
    margin-bottom: 0;
    font-size: 0.8rem;
}

.tn-page-header .breadcrumb a {
    color: var(--gray-500);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    .tn-hero .carousel-item {
        height: 350px;
    }

    .tn-hero .carousel-caption h1 {
        font-size: 1.75rem;
    }

    .tn-hero .carousel-caption p {
        font-size: 0.9rem;
    }

    .tn-admin-layout {
        flex-direction: column;
    }

    .tn-admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
        padding: var(--space-md) var(--space-md) 0;
        border-bottom: 1px solid var(--gray-200);
        z-index: 100;
    }

    .tn-admin-sidebar .sidebar-brand {
        margin-bottom: 0;
        padding-bottom: var(--space-sm);
        border-bottom: none;
    }

    .tn-admin-sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding-bottom: 8px;
    }

    .tn-admin-sidebar .nav-link {
        padding: 0.5rem var(--space-md);
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .tn-admin-sidebar .nav-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent-green);
    }

    .tn-admin-sidebar div[style*="border-top"] {
        display: flex;
        border-top: none !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .tn-admin-content {
        margin-left: 0;
        padding: var(--space-md);
    }

    .navbar-nav .dropdown-menu {
        position: absolute;
        right: 0;
        left: auto;
        top: 100%;
        min-width: 200px;
        box-shadow: var(--shadow-md);
    }

    .tn-product-detail .product-info {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .tn-cart-item {
        flex-direction: column;
        text-align: center;
    }

    .tn-setup-card {
        height: 200px;
    }

    .tn-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
    }

    .tn-timeline {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
}

@media (max-width: 576px) {
    .tn-product-detail .product-price {
        font-size: 1.5rem;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.4s ease forwards;
}

/* Stagger animation for cards */
.tn-product-card:nth-child(1) { animation-delay: 0s; }
.tn-product-card:nth-child(2) { animation-delay: 0.05s; }
.tn-product-card:nth-child(3) { animation-delay: 0.1s; }
.tn-product-card:nth-child(4) { animation-delay: 0.15s; }
.tn-product-card:nth-child(5) { animation-delay: 0.2s; }
.tn-product-card:nth-child(6) { animation-delay: 0.25s; }

/* Modal overrides for Bootstrap */
.modal-content {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-lg);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: var(--space-md) var(--space-lg);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Quantity Control Styles */
.tn-quantity-control, .tn-quantity-control-live {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 40px;
    width: 120px;
}

.tn-quantity-control button, .tn-quantity-control-live button {
    background: var(--gray-50);
    border: none;
    width: 36px;
    height: 100%;
    font-size: 1.2rem;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tn-quantity-control button:hover:not(:disabled), .tn-quantity-control-live button:hover:not(:disabled) {
    background: var(--gray-200);
    color: var(--primary-color);
}

.tn-quantity-control button:disabled, .tn-quantity-control-live button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tn-quantity-control input.qty-value, .tn-quantity-control-live input.qty-value {
    border: none;
    border-left: 1px solid var(--gray-300);
    border-right: 1px solid var(--gray-300);
    text-align: center;
    width: calc(100% - 72px);
    height: 100%;
    font-weight: 600;
    color: var(--gray-800);
    background: transparent;
}

.tn-quantity-control input.qty-value:focus, .tn-quantity-control-live input.qty-value:focus {
    outline: none;
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--black);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast), color var(--transition-fast), transform 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--gray-100);
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: inline-block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none;
}

.theme-toggle-btn .sun-icon {
    display: none;
}

.theme-toggle-btn .moon-icon {
    display: inline-block;
}

/* ============================================================
   DARK THEME SPECIFIC OVERRIDES
   ============================================================ */
[data-theme="dark"] .tn-navbar {
    border-bottom: 1px solid #243B2E;
}

[data-theme="dark"] .dropdown-menu {
    background: #1E1E1E;
    border-color: #333;
}

[data-theme="dark"] .dropdown-item {
    color: #BDBDBD;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #2D2D2D;
    color: #F5F5F5;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #333;
}

/* ============================================================
   SEAMLESS PRODUCT IMAGES (Both Themes)
   Removes the square box around images by blending their 
   off-white backgrounds into the container.
   ============================================================ */
.tn-product-card .card-img-wrapper img,
.tn-product-detail .product-image img,
.tn-cart-item .cart-item-img img,
.tn-cart-summary img,
.tn-table .product-cell img,
.tn-setup-card img {
    mix-blend-mode: multiply;
}

/* ============================================================
   WHITE IMAGE PAD FOR DARK THEME
   Ensure the containers are pure white so the multiply blend 
   doesn't darken the products themselves.
   ============================================================ */
[data-theme="dark"] .tn-product-card .card-img-wrapper,
[data-theme="dark"] .tn-product-detail .product-image,
[data-theme="dark"] .tn-cart-item .cart-item-img,
[data-theme="dark"] .tn-setup-card {
    background-color: #FFFFFF !important;
}

/* For inline image backgrounds in dark theme (e.g., checkout/orders) */
[data-theme="dark"] img[style*="background:var(--gray-50)"] {
    background-color: #FFFFFF !important;
}


/* ============================================================
   IMAGE UPLOAD AREA (Admin)
   ============================================================ */
.tn-image-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    background: var(--gray-50);
    transition: border-color var(--transition-fast);
}

.tn-image-upload-area:hover {
    border-color: var(--accent-green);
}

.tn-image-upload-area input[type="file"] {
    margin-top: var(--space-sm);
}

/* ============================================================
   MOBILE RESPONSIVENESS & FIXES
   ============================================================ */
@media (max-width: 768px) {
    /* Reduce thick padding on mobile */
    .tn-page-header {
        padding: var(--space-md) 0;
    }
    .tn-product-detail {
        padding: var(--space-md) 0;
    }
    .tn-product-detail .product-image {
        min-height: 250px;
        padding: var(--space-md);
    }
    .tn-product-detail .product-info h1 {
        font-size: 1.4rem;
    }
    .tn-product-detail .product-price {
        font-size: 1.5rem;
    }
    .tn-product-detail .d-flex.gap-3.mb-4 {
        position: fixed;
        bottom: 60px; /* Above bottom nav */
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 12px 16px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        z-index: 1040;
        flex-direction: row !important; /* Keep side by side on mobile */
        margin-bottom: 0 !important;
        border-top: 1px solid var(--gray-200);
        gap: var(--space-md) !important;
    }
    
    [data-theme="dark"] .tn-product-detail .d-flex.gap-3.mb-4 {
        background: var(--navbar-bg);
        border-top: 1px solid #243B2E;
    }
    
    .tn-product-detail .d-flex.gap-3.mb-4 > form,
    .tn-product-detail .d-flex.gap-3.mb-4 > button {
        flex: 1;
        width: 100%;
        min-width: unset !important;
    }
    
    /* Make product image edge-to-edge on mobile */
    .tn-product-detail .product-image {
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        margin-top: -15px;
        border-bottom: 1px solid var(--gray-200);
        padding: var(--space-xl) var(--space-md);
        min-height: 300px;
    }
    
    [data-theme="dark"] .tn-product-detail .product-image {
        border-bottom: 1px solid #243B2E;
    }
}

/* ============================================================
   MOBILE BOTTOM NAVIGATION
   ============================================================ */
.tn-mobile-bottom-nav {
    display: none;
}

@media (max-width: 991px) {
    .tn-mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 1050;
        justify-content: space-around;
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--gray-200);
        transition: background-color var(--transition-normal);
    }
    
    [data-theme="dark"] .tn-mobile-bottom-nav {
        background: var(--navbar-bg);
        border-top: 1px solid #243B2E;
        box-shadow: 0 -2px 15px rgba(0,0,0,0.5);
    }

    .tn-mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--gray-500);
        font-size: 0.75rem;
        font-weight: 500;
        text-decoration: none;
        width: 25%;
        gap: 4px;
        transition: color var(--transition-fast);
    }

    .tn-mobile-bottom-nav .nav-item .tn-icon {
        width: 1.5em;
        height: 1.5em;
    }

    .tn-mobile-bottom-nav .nav-item.active {
        color: var(--accent-green-dark);
    }
    
    [data-theme="dark"] .tn-mobile-bottom-nav .nav-item.active {
        color: var(--accent-green);
    }

    .tn-mobile-bottom-nav .nav-item .badge {
        position: absolute;
        top: -6px;
        right: -10px;
        background: var(--black);
        color: var(--white);
        border: 2px solid var(--white);
        border-radius: var(--radius-full);
        font-size: 0.65rem;
        font-weight: 600;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    [data-theme="dark"] .tn-mobile-bottom-nav .nav-item .badge {
        background: var(--accent-green);
        color: var(--black);
        border-color: var(--navbar-bg);
    }
    
    /* Ensure body has padding at the bottom so content isn't hidden by the bottom nav */
    body {
        padding-bottom: 70px;
    }
}

/* Hamburger Menu Icon for Dark Mode */
[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-theme="dark"] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Fix CLS and Layout Shift on Hero Carousel */
.tn-hero .carousel-inner { min-height: 500px; background-color: #f1f3f5; }
.tn-hero .carousel-item img { height: 500px; width: 100%; object-fit: cover; }


/* Disable smooth scrolling on load to fix scroll restoration jump */
html { scroll-behavior: auto !important; }

