:root {
    /* DESIGN SYSTEM 1.0 - Mapped Variables */
    --primary: #5C7244;
    /* Olive/Tactical Green */
    --primary-hover: #4A5C37;
    /* Darker for hover */
    --secondary: #262626;
    /* Secondary surfaces */

    --dark-bg: #121212;
    /* Main page background */
    --darker-bg: #0F0F0F;
    /* Deepest black */
    --card-bg: #1A1A1A;
    /* Card backgrounds */

    --text-main: #F2F2F2;
    /* Primary text */
    --text-muted: #999999;
    /* Secondary/muted text */

    --border: #333333;
    /* Borders and dividers */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.5);

    /* Accent Colors */
    --accent: #E8A70A;
    /* Golden amber */
    --destructive: #EB4D4D;
    /* Error/danger red */
    --warning: #E8A70A;
    /* Warning (same as accent) */

    /* Typography */
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Inter', sans-serif;

    /* Border Radius */
    --radius: 0.375rem;
}

/* Global Reset & Normalization */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
    /* Base size */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: var(--darker-bg);
    color: var(--text-main);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5C7244;
    /* Lighter olive */
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--dark-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 20px;
}

nav ul li {
    display: inline-block;
}

nav a {
    color: inherit;
    text-decoration: none;
}

.cart-badge {
    background-color: var(--secondary);
    color: var(--darker-bg);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    position: relative;
    top: -8px;
    margin-left: -5px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* === COMPONENT STANDARDIZATION === */

/* Cards - Terminal Style */
.card,
.product-card,
.vendor-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    /* Sharp corners for military look */
    padding: 20px;
    box-shadow: none;
    /* Remove soft shadows */
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover,
.product-card:hover,
.vendor-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(107, 142, 35, 0.2);
}

/* Inputs - Terminal Style */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: #000000;
    border: 1px solid var(--border);
    color: var(--primary);
    font-family: var(--font-mono);
    border-radius: 2px;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(107, 142, 35, 0.3);
    background-color: #121212;
}

/* Buttons - Tactical Style */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary);
    color: #1a1c15;
    /* Dark text on olive btn */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.btn:hover {
    background-color: #7da82e;
    /* Lighter olive */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.4);
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(107, 142, 35, 0.3);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-main);
}

.btn-outline:hover {
    background: white;
    color: var(--darker-bg);
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--secondary);
}

/* Standard Product Card Styles */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    background: var(--dark-bg);
}

.category-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--secondary);
    color: var(--darker-bg);
    border-radius: 3px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.btn-wishlist,
.btn-compare {
    position: absolute;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-wishlist:hover,
.btn-compare:hover {
    background: var(--secondary);
    color: var(--darker-bg);
}

.btn-wishlist {
    top: 10px;
}

.btn-compare {
    top: 55px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: var(--primary);
    color: #EB4D4D;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: #5C7244;
    color: #5C7244;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    margin-top: 80px;
}

footer h3,
footer h4 {
    color: white;
    margin-bottom: 20px;
}

footer ul li {
    margin-bottom: 10px;
}

footer a {
    color: var(--text-muted);
}

footer a:hover {
    color: var(--secondary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Navigation Polish */
.nav-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Footer Polish */
.footer-links a {
    display: block;
    margin-bottom: 8px;
    transition: padding-left 0.2s ease;
}

.footer-links a:hover {
    padding-left: 5px;
    color: var(--secondary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 0.8rem 0;
    }

    .info-grid {
        grid-template-columns: 1fr !important;
    }

    .card {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .btn,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    .bottom-nav {
        display: flex !important;
    }

    footer {
        padding-bottom: 140px !important;
    }
}

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: var(--primary);
    color: #EB4D4D;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: #5C7244;
    color: #5C7244;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    margin-top: 80px;
}

footer h3,
footer h4 {
    color: white;
    margin-bottom: 20px;
}

footer ul li {
    margin-bottom: 10px;
}

footer a {
    color: var(--text-muted);
}

footer a:hover {
    color: var(--secondary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Navigation Polish */
.nav-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Footer Polish */
.footer-links a {
    display: block;
    margin-bottom: 8px;
    transition: padding-left 0.2s ease;
}

.footer-links a:hover {
    padding-left: 5px;
    color: var(--secondary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 0.8rem 0;
    }

    .info-grid {
        grid-template-columns: 1fr !important;
    }

    .card {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .btn,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    .bottom-nav {
        display: flex !important;
    }

    footer {
        padding-bottom: 80px;
    }
}

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-decoration: none;
    transition: color 0.2s;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--secondary);
}

/* =========================================
   Product Detail Page Styles
   ========================================= */

.product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.product-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-image-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-product-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 15px;
    background: var(--dark-bg);
}

.product-info {
    padding: 10px 0;
}

.breadcrumb {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--secondary);
}

.product-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--secondary);
    color: var(--darker-bg);
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 15px;
}

.product-title {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.product-price {
    font-size: 2.5rem;
    color: var(--secondary);
    font-weight: bold;
    margin: 15px 0;
}

.price-per-round {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: -10px;
    margin-bottom: 20px;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(92, 114, 68, 0.1);
    border: 1px solid #5C7244;
    border-radius: 4px;
    color: #5C7244;
    font-weight: 600;
    margin: 15px 0;
}

.variation-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.variation-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variation-swatch {
    padding: 8px 16px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variation-swatch:hover {
    border-color: var(--text-muted);
}

.variation-swatch.active {
    border-color: var(--secondary);
    background: rgba(212, 175, 55, 0.1);
    /* Gold tint */
}

/* CTA Section */
.cta-section {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.btn-add-cart {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-wishlist-large {
    padding: 16px;
    font-size: 1.2rem;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.cart-buttons-right {
    display: flex;
    gap: 15px;
}

.btn-clear {
    background-color: #999999;
    color: white;
}

.btn-checkout {
    font-size: 1.1em;
    padding: 12px 30px;
}

/* Mobile Styles for Actions */
@media (max-width: 768px) {
    .cta-section {
        flex-direction: row;
        /* Keep row for big buttons */
        /* If very small screen, maybe column? For now row is standard e-commerce */
    }

    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }

    .cart-buttons-right {
        flex-direction: column;
        width: 100%;
    }

    .cart-actions .btn {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    /* Search Results - Mobile */
    .search-results-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

/* Search Grid - Desktop Default */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

/* Removed orphaned code */

.btn-wishlist-large.active {
    border-color: #EB4D4D;
    color: #EB4D4D;
}

.ffl-warning {
    background: rgba(192, 57, 43, 0.1);
    border-color: var(--primary);
    padding: 16px;
    margin-top: 15px;
}

/* Vendor Profile Styles */
.vendor-header-flex {
    display: flex;
    gap: 40px;
    align-items: start;
}

.vendor-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 20px;
    background: var(--dark-bg);
    border-radius: 8px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .vendor-header-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .vendor-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Make the last odd item span 2 columns if needed, or just let it hang */
    .vendor-stats-grid>div:last-child:nth-child(odd) {
        grid-column: span 2;
    }
}

.ffl-warning h4 {
    color: var(--primary);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Inline Vendor Info Bar */
.vendor-info-bar {
    background: var(--dark-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0 20px 0;
}

.vendor-info-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.vendor-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vendor-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.vendor-name-link {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}

.vendor-name-link:hover {
    text-decoration: underline;
}

.vendor-response-time {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.vendor-info-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.vendor-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.vendor-btn-message {
    background: var(--card-bg);
    border: 2px solid var(--border);
    color: var(--text-main);
}

.vendor-btn-message:hover {
    border-color: var(--text-main);
    transform: translateY(-1px);
}

.vendor-btn-rate {
    background: var(--secondary);
    color: var(--darker-bg);
}

.vendor-btn-rate:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Mobile Vendor Info Bar */
@media (max-width: 768px) {
    .vendor-info-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .vendor-info-item {
        justify-content: space-between;
        width: 100%;
    }

    .vendor-info-actions {
        margin-left: 0;
        width: 100%;
    }

    .vendor-action-btn {
        flex: 1;
        justify-content: center;
    }

    .vendor-action-btn .btn-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    .vendor-action-btn .btn-text {
        display: none;
    }

    .vendor-action-btn {
        padding: 10px;
        min-width: 44px;
        justify-content: center;
    }
}

/* Tabs */
.section-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border);
    margin: 40px 0 20px 0;
    overflow-x: auto;
    padding-bottom: 2px;
    /* Prevent scrollbar overlap */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.section-tabs::-webkit-scrollbar {
    height: 6px;
}

.section-tabs::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 3px;
}

.section-tabs::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.section-tabs::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-button:hover {
    color: var(--text-main);
}

.tab-button.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Mobile Tabs */
@media (max-width: 768px) {
    .section-tabs {
        gap: 5px;
        margin: 30px 0 15px 0;
        justify-content: flex-start;
    }

    .tab-button {
        padding: 10px 14px;
        font-size: 0.85rem;
        min-width: fit-content;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}


.tab-content {
    display: none;
    padding: 20px 0;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Specs & Features */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.spec-card {
    background: var(--card-bg);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.spec-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-value {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: start;
    gap: 10px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.feature-item i {
    color: var(--secondary);
    margin-top: 3px;
}

/* Ballistics Table */
.ballistics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

.ballistics-table th,
.ballistics-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.ballistics-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.ballistics-table tr:last-child td {
    border-bottom: none;
}

/* Why Buy Grid */
.why-buy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.why-buy-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s ease;
}

.why-buy-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.why-buy-card h4 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Reviews */
.reviews-section {
    margin: 60px 0;
}

.review-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.rating-large {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--text-main);
    line-height: 1;
}

.stars {
    color: #E8A70A;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.review-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.verified-badge {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
}

/* Read More Button */
.btn-read-more {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    margin-top: 10px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-read-more:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 968px) {
    .product-header {
        grid-template-columns: 1fr;
    }

    .product-image-gallery {
        position: static;
        margin-bottom: 30px;
    }

    .main-product-image {
        height: auto;
        max-height: 400px;
    }
}

/* =========================================
   Shop/Vendor Layout Styles
   ========================================= */

.shop-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.filter-option {
    display: block;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.filter-option:hover {
    background: var(--dark-bg);
    color: var(--text-main);
    padding-left: 16px;
}

.filter-option.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--secondary);
    border-left: 3px solid var(--secondary);
}

/* ================================================
   MOBILE RESPONSIVE STYLES - FIXED & COMPREHENSIVE
   ================================================ */

/* Prevent horizontal scroll on all devices */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* Desktop: 4 columns */
.grid-3,
.product-grid,
.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Tablet: 3 columns */
@media (max-width: 1200px) {
    .shop-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .sidebar-section {
        margin-bottom: 0;
    }

    .grid-3,
    .product-grid,
    .shop-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Mobile Navigation & Layout */
@media (max-width: 1024px) {

    /* Hide desktop menu */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-main);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Mobile navigation */
    .nav-menu {
        position: fixed !important;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark-bg);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        /* Hide scrollbar */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .nav-menu.active {
        right: 0 !important;
    }

    .nav-menu ul {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li a {
        display: block;
        padding: 15px 10px;
        font-size: 1.1rem;
    }

    /* Menu overlay */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 9998;
    }
}

/* Mobile: 2 columns (PRIMARY REQUIREMENT) */
@media (max-width: 768px) {

    /* ====== SHOP SIDEBAR - COMPLETELY HIDDEN ====== */
    .sidebar,
    #shopSidebar,
    aside.sidebar,
    .shop-container>.sidebar,
    .sidebar-overlay,
    .filter-toggle-btn {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }

    .shop-container {
        display: block !important;
        flex-direction: column !important;
    }

    .product-grid {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ====== END SIDEBAR HIDING ====== */

    /* Ensure shop product grid displays correctly on mobile */
    .shop-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .shop-grid .card {
        width: 100% !important;
        padding: 12px !important;
    }

    .product-image {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }

    /* Vendor page table scroll on mobile */
    .vendor-product-table {
        display: block;
        overflow-x: auto;
        width: 100%;
    }

    .vendor-product-table table {
        width: 100%;
        min-width: 600px;
    }

    /* --- LANDING PAGE GRIDS --- */

    /* 1. Categories - 2 Columns */
    /* Category Grid - Mobile */
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Hero Buttons - Full width on mobile */
    .hero-btns .btn {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        row-gap: 40px !important;
    }

    /* 2. Top Products - 2 Columns */
    .top-selling-grid,
    #top-selling-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* 3. Featured Vendors - 2 Columns */
    #top-vendors-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* 4. Professional Tools - 2 Columns */
    .tools-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Testimonials Slider - Mobile */
    .testimonials-section .grid-3 {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 20px !important;
        grid-template-columns: none !important;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .testimonials-section .grid-3::-webkit-scrollbar {
        display: none;
    }

    .testimonials-section .grid-3>div {
        flex: 0 0 90% !important;
        width: 90% !important;
        scroll-snap-align: center;
    }

    /* Generic Grids */
    .grid-3,
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* --- HEADER & HERO --- */

    header {
        padding: 10px 0 !important;
    }

    .hero-wrapper {
        height: auto !important;
        min-height: 600px;
        /* Give enough space */
        margin-left: -15px !important;
        margin-right: -15px !important;
        border-radius: 0 0 15px 15px !important;
    }

    .hero-flex-container {
        flex-direction: column !important;
        justify-content: flex-end !important;
        padding-bottom: 60px;
        text-align: center;
    }

    .hero-content {
        width: 100% !important;
        padding: 0 20px;
    }

    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 25px !important;
    }

    /* Buttons in Hero */
    .hero-btns {
        flex-direction: column;
        gap: 15px !important;
        width: 100%;
    }

    .hero-btns .btn {
        width: 100% !important;
    }

    /* --- COMPONENT ADJUSTMENTS --- */

    /* Cards */
    .card {
        padding: 15px !important;
    }

    /* Product images */
    .product-image {
        height: 140px !important;
        /* Slightly smaller to fit 2 cols */
    }

    /* Hide some details on very small cards if needed, 
       but keeping them visible for now */

    /* Typography */
    h2 {
        font-size: 1.8rem !important;
        margin-bottom: 25px !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    /* Forms & Interactive - Touch Friendly */
    input,
    select,
    textarea,
    .btn {
        font-size: 16px !important;
        /* No zoom */
        min-height: 48px !important;
        /* Comfortable tap target */
    }

    /* Product detail page specific */
    .product-header {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .main-product-image {
        height: 300px !important;
    }

    .product-title {
        font-size: 1.8rem !important;
    }

    .product-price {
        font-size: 2rem !important;
    }

    /* Footer */
    footer {
        padding-bottom: 90px;
        /* Space for bottom nav */
    }

    /* Admin */
    .admin-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cart-grid {
        grid-template-columns: 1fr !important;
    }

    /* Fix overflow */
    .container,
    .card,
    .product-container {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }

    table {
        width: 100%;
        display: block;
        overflow-x: auto;
    }
}

/* Very Small Mobile (< 380px) */
/* Only switch to 1 column if absolutely necessary for readability */
@media (max-width: 380px) {

    .category-grid,
    .top-selling-grid,
    #top-selling-grid,
    #top-vendors-grid,
    .tools-grid {
        /* Keep 2 columns even on small screens if possible, 
           or switch to 1 if content breaks. 
           Let's stick to 2 columns as requested for "mobile" general definition,
           but 1 column for tiny phones helps readability. */
        grid-template-columns: 1fr !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
    }
}

/* Fix common overflow issues */
@media (max-width: 768px) {

    /* Prevent text overflow */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Fix flexbox overflow */
    .flex {
        flex-wrap: wrap !important;
    }

    /* Ensure no element exceeds viewport */
    * {
        max-width: 100vw;
    }

    /* Section specific spacing */
    section {
        margin-bottom: 40px !important;
        margin-top: 40px !important;
    }
}

/* Basic Grid System (Bootstrap-like) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 769px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Checkout Grid */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Responsive Utilities */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* ==========================================================================
   CONSISTENT FONT STACK - Inter + JetBrains Mono
   ========================================================================== */

/* Apply JetBrains Mono to tactical/monospace elements */
code,
pre,
kbd,
samp,
.font-mono,
.price,
.product-price,
.stat-value,
.countdown,
.badge,
.cart-badge,
.notification-badge,
.status-badge,
input[type="number"],
.quantity-input {
    font-family: var(--font-mono) !important;
}

/* Ensure all text elements use Inter by default */
body,
p,
h1,
h2,
h3,
h4,
h5,
h6,
a,
span,
div,
button,
input,
select,
textarea,
label,
li {
    font-family: var(--font-main);
}

/* Tactical labels - use JetBrains Mono */
.terminal-label,
.hud-label,
.tactical-label,
[class*="tracking-"],
.uppercase.text-xs,
.uppercase.text-sm {
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}