/* wepro-safety.com Main Stylesheet */

/* --- Design Tokens --- */
:root {
    /* Light theme (page background) */
    --bg-primary: #ffffff;
    --bg-secondary: #f6f6f6;
    --bg-tertiary: #ececec;
    --text-primary: #111111;
    --text-secondary: #4d4d4d;
    --text-muted: #8a8a8a;

    /* Dark zone (header / footer / hero) */
    --dark-bg: #0a0a0a;
    --dark-text: #ffffff;
    --dark-text-secondary: #b3b3b3;
    
    /* Brand Theme Colors */
    --color-green: #12c06a; /* Safety Green (Vibrant) */
    --color-green-dark: #0d8b4c;
    --color-yellow: #ffb300; /* Safety Yellow (Vibrant) */
    --color-yellow-hover: #ffa000;
    --color-black: #000000;
    
    /* Layout Variables */
    --max-width: 1200px;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 30px rgba(18, 192, 106, 0.18);
    
    /* Font Stack */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Kanit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

button, input, textarea, select {
    font-family: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-green), var(--color-yellow));
    border-radius: 2px;
}

.highlight-green {
    color: var(--color-green);
}

.highlight-yellow {
    color: var(--color-yellow);
}

/* --- Layout Utilities --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

/* --- Components --- */

/* Dynamic Header */
header {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    color: var(--dark-text); /* Header stays dark — force white text */
}

header h1, header h2, header h3 {
    color: var(--dark-text);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-shield {
    color: var(--color-yellow);
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-green);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-green);
}

.nav-links a.active {
    color: var(--color-green);
}

.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--dark-text);
    font-size: 1.8rem;
    cursor: pointer;
}

/* Primary Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--color-green);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-green-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(18, 192, 106, 0.4);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: var(--color-green);
    transform: translateY(-2px);
}

.btn-yellow {
    background-color: var(--color-yellow);
    color: var(--color-black);
}

.btn-yellow:hover {
    background-color: var(--color-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 80vh;
    background-color: var(--dark-bg); /* Hero banner stays dark */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(18, 192, 106, 0.15) 0%, rgba(0, 0, 0, 0.9) 70%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    z-index: 0;
    opacity: 0.45;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(18, 192, 106, 0.15);
    color: var(--color-green);
    border: 1px solid rgba(18, 192, 106, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: var(--dark-text);
}

.hero p {
    color: var(--dark-text-secondary);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-green), var(--color-yellow));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(18, 192, 106, 0.2);
    box-shadow: var(--shadow);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-green);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Product Cards & Grid --- */
.products-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--color-green);
    color: var(--bg-primary);
    border-color: var(--color-green);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(18, 192, 106, 0.2);
}

.product-image-container {
    position: relative;
    padding-top: 100%; /* Square aspect ratio */
    background-color: #f0f0f0;
    overflow: hidden;
}

.product-image-container svg, .product-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

/* Real product photos: show the whole product on a clean white background,
   layered above the fallback SVG icon. If the photo fails to load it is
   removed (see onerror) and the SVG icon shows through. */
.product-image-container img.product-photo {
    object-fit: contain;
    background-color: #ffffff;
    z-index: 1;
}

.product-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(10, 10, 10, 0.8);
    color: var(--color-yellow);
    border: 1px solid var(--color-yellow);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    z-index: 2;
    text-transform: uppercase;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.2em; /* Lock height for neatness */
}

.product-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-yellow);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-links {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* --- Review Section --- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.review-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.review-card:hover {
    border-color: rgba(255, 179, 0, 0.2);
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviewer-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--color-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-green);
    font-family: var(--font-heading);
}

.reviewer-name {
    font-weight: 600;
}

.reviewer-badge {
    background-color: rgba(18, 192, 106, 0.1);
    color: var(--color-green);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-weight: 500;
    margin-top: 0.25rem;
    display: inline-block;
}

.rating-stars {
    color: var(--color-yellow);
    font-size: 0.95rem;
}

.review-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.review-product {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.8rem;
    color: var(--color-green);
}

/* --- Review Submission Form --- */
.review-form-container {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    max-width: 600px;
    margin: 4rem auto 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-green);
    box-shadow: 0 0 0 2px rgba(18, 192, 106, 0.2);
}

.rating-select {
    display: flex;
    gap: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.rating-select span:hover, .rating-select span.active {
    color: var(--color-yellow);
}

/* --- Contact Us Section --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 1.5rem;
}

.contact-info-icon {
    font-size: 1.8rem;
    color: var(--color-green);
    background-color: var(--bg-secondary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.contact-info-details h3 {
    margin-bottom: 0.25rem;
}

.contact-info-details p, .contact-info-details a {
    color: var(--text-secondary);
}

.contact-info-details a:hover {
    color: var(--color-green);
}

.map-wrapper {
    margin-top: 2rem;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 350px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.social-shopee {
    background-color: #ee4d2d;
    color: white;
}

.social-shopee:hover {
    background-color: #d13b1f;
    transform: translateY(-2px);
}

.social-lazada {
    background-color: #0f136d;
    color: white;
}

.social-lazada:hover {
    background-color: #07094d;
    transform: translateY(-2px);
}

/* --- Dynamic Footer --- */
footer {
    background-color: var(--color-black);
    padding: 5rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--dark-text-secondary); /* Footer stays dark — light text */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--color-green);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a:hover {
    color: var(--color-green);
    padding-left: 0.25rem;
}

.footer-contact-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-contact-item svg {
    color: var(--color-green);
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

/* --- Error Page (404/500) Styling --- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.error-container {
    max-width: 500px;
    z-index: 2;
}

.error-code {
    font-size: 8rem;
    font-family: var(--font-heading);
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.error-container h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero {
        padding: 6rem 0;
        min-height: auto;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .nav-links {
        display: none; /* Mobile menu handled dynamically in JS */
    }
    .mobile-menu-btn {
        display: block;
    }
    .header-container {
        height: 70px;
    }
    .section-padding {
        padding: 4rem 0;
    }
    .hero h1 {
        font-size: 2.4rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile Nav Drawer style */
.mobile-nav-active {
    overflow: hidden;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-secondary);
    z-index: 2000;
    padding: 3rem 2rem;
    box-shadow: -5px 0 30px rgba(0,0,0,0.8);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-drawer.open {
    right: 0;
}

.mobile-nav-drawer .close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-list a {
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.mobile-nav-list a.active {
    color: var(--color-green);
}

.overlay-active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    z-index: 1500;
}

/* ============================================
   Product card clickable + Product Detail Page
   ============================================ */
.product-image-container { display: block; cursor: pointer; }
.product-title a { color: inherit; text-decoration: none; transition: var(--transition); }
.product-title a:hover { color: var(--color-green); }

/* Breadcrumb */
.detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.detail-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.detail-breadcrumb a:hover { color: var(--color-green); }
.detail-breadcrumb .sep { opacity: 0.5; }
.detail-breadcrumb .current { color: var(--color-green); }

/* Detail layout */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}
.detail-image {
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(0,0,0,0.08);
    cursor: default;
}
.detail-info { padding-top: 0.5rem; }
.detail-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    line-height: 1.35;
    margin: 0.75rem 0 1rem;
}
.detail-price {
    color: var(--color-yellow);
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.detail-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.75rem;
}
.detail-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.detail-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; gap: 2rem; }
    .detail-title { font-size: 1.5rem; }
    .detail-price { font-size: 2rem; }
    .detail-actions .btn { flex: 1; text-align: center; }
}

/* LINE QR box (contact page) */
.line-qr-box {
    position: relative;
    width: 168px;
    height: 168px;
    background: #ffffff;
    border-radius: 14px;
    margin-top: 0.75rem;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.line-qr-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}
.line-qr-box .qr-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.5rem;
}

/* Header/footer logo image */
.logo-img { height: 42px; width: auto; display: block; }
.footer-col .logo-img { height: 48px; }

/* Product detail — rating, specs table, full description */
.detail-rating {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.detail-stars { color: var(--color-yellow); font-size: 1.15rem; letter-spacing: 1px; }
.detail-rating-num { font-weight: 700; color: var(--text-primary); }
.detail-rating-label { color: var(--text-muted); font-size: 0.85rem; }

.detail-body { margin-top: 3.5rem; }
.detail-section {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--border-radius-lg);
    padding: 2rem 2.25rem;
    margin-bottom: 1.75rem;
}
.detail-section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    padding-left: 0.9rem;
    border-left: 4px solid var(--color-green);
    line-height: 1.2;
}
.detail-specs { width: 100%; border-collapse: collapse; }
.detail-specs tr { border-bottom: 1px solid rgba(0,0,0,0.08); }
.detail-specs tr:last-child { border-bottom: none; }
.detail-specs th {
    text-align: left;
    vertical-align: top;
    font-weight: 500;
    color: var(--text-muted);
    width: 38%;
    padding: 0.7rem 1rem 0.7rem 0;
}
.detail-specs td { padding: 0.7rem 0; color: var(--text-primary); }
.detail-fulldesc {
    white-space: pre-line;
    line-height: 1.9;
    color: var(--text-secondary);
    font-size: 0.97rem;
}
@media (max-width: 768px) {
    .detail-section { padding: 1.5rem 1.25rem; }
    .detail-specs th { width: 45%; }
}

/* Logo badge — stands out on the dark header/footer */
.logo-img {
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

/* --- Products Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.9rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--color-green);
    color: var(--color-green);
}

.page-btn.active {
    background-color: var(--color-green);
    border-color: var(--color-green);
    color: #ffffff;
    cursor: default;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 0.25rem;
}

/* --- Responsive: จอเล็ก/มือถือ --- */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .product-info { padding: 1rem; }
    .product-title { font-size: 0.95rem; height: 3em; }
    .product-price { font-size: 1.1rem; margin-bottom: 0.75rem; }
    .product-desc { display: none; }
    .product-links { grid-template-columns: 1fr; }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .feature-card { padding: 1.5rem 1rem; }
    .reviews-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    .hero { padding: 4rem 0; }
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 1rem; }
    .section-padding { padding: 3rem 0; }
    .logo-text { font-size: 1.1rem; }
    .logo-img { height: 34px; }
    .nav-actions { gap: 0.5rem; }
    .btn-sm { padding: 0.45rem 0.8rem; font-size: 0.78rem; }
    .products-filter { gap: 0.5rem; }
    .filter-btn { padding: 0.4rem 1rem; font-size: 0.85rem; }
    .review-form-container { padding: 1.5rem; }
    .detail-section { padding: 1.25rem 1rem; }
    .footer-grid { gap: 2rem; }
    .page-btn { min-width: 36px; height: 36px; padding: 0 0.6rem; font-size: 0.85rem; }
}

/* --- Product detail: image gallery thumbnails --- */
.detail-thumbs {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

.detail-thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    flex-shrink: 0;
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.detail-thumb:hover,
.detail-thumb.active {
    border-color: var(--color-green);
}

@media (max-width: 480px) {
    .detail-thumb { width: 58px; height: 58px; }
}
