/* ============================================================
   RESET & BASE – Mobile First
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HEADER & NAVIGATION – Responsive
   ============================================================ */
header {
    background: #1a1a2e;
    color: #fff;
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    padding: 0.3rem 0.5rem;
    border-bottom: 2px solid transparent;
    display: inline-block;
}

nav ul li a:hover {
    color: #e94560;
    border-bottom-color: #e94560;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 60vh;
}

/* ============================================================
   HERO SECTION – Responsive
   ============================================================ */
.hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, #e94560, #0f3460);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 800;
    word-wrap: break-word;
}

.hero p {
    font-size: 1.05rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.hero-hint {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ============================================================
   PRODUCT GRID – Fully Responsive
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-card .content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.product-card .category-tag {
    display: inline-block;
    background: #e94560;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.product-card h3 {
    font-size: 1.05rem;
    margin: 0.2rem 0;
    color: #1a1a2e;
    line-height: 1.3;
}

.product-card .price {
    color: #e94560;
    font-weight: 700;
    font-size: 1.2rem;
}

.product-card .rating {
    color: #f39c12;
    font-size: 0.95rem;
}

.product-card .description {
    font-size: 0.9rem;
    color: #666;
    margin: 0.2rem 0 0.6rem 0;
    flex: 1;
    line-height: 1.5;
}

.product-card .btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.product-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff9900;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
    flex: 1;
    min-height: 44px;
    min-width: 44px;
}

.product-card .btn:hover {
    background: #e68a00;
    transform: scale(1.02);
}

.product-card .btn-detail {
    background: #3498db;
}

.product-card .btn-detail:hover {
    background: #2980b9;
}

/* ============================================================
   PRODUCT DETAIL – Responsive
   ============================================================ */
.product-detail {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-detail .detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.product-detail .detail-category {
    display: inline-block;
    background: #e94560;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-detail .detail-price {
    font-size: 1.8rem;
    color: #e94560;
    font-weight: 700;
}

.product-detail .detail-rating {
    color: #f39c12;
    font-size: 1rem;
}

.product-detail .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff9900;
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s;
    min-height: 48px;
    min-width: 48px;
}

.product-detail .btn:hover {
    background: #e68a00;
}

/* ============================================================
   DISCLOSURE
   ============================================================ */
.disclosure {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #856404;
}

.disclosure strong {
    color: #333;
}

/* ============================================================
   SIDEBAR – Responsive Slide-in
   ============================================================ */
.sidebar-toggle {
    position: fixed;
    top: 75px;
    left: 12px;
    z-index: 1000;
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

.sidebar-toggle:hover {
    background: #e94560;
    transform: scale(1.05);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -340px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    height: 100dvh;
    background: #1a1a2e;
    color: #fff;
    padding: 20px 16px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    overscroll-behavior: contain;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e94560;
    padding-bottom: 12px;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.sidebar .close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 4px 8px;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

.sidebar .close-btn:hover {
    transform: rotate(90deg);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    padding: 12px 14px;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    transition: background 0.2s, padding-left 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    font-size: 0.95rem;
    touch-action: manipulation;
}

.sidebar ul li:hover {
    background: #2a2a3e;
    padding-left: 20px;
}

.sidebar ul li.active {
    background: #e94560;
    border-radius: 6px;
    font-weight: 600;
}

.sidebar ul li .count {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.sidebar ul li.active .count {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   OVERLAY
   ============================================================ */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================================
   CHECKLIST SECTIONS – Responsive
   ============================================================ */
.checklist-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.checklist-section h2 {
    color: #1a1a2e;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid #e94560;
    padding-bottom: 0.4rem;
    font-size: 1.3rem;
}

.checklist-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    align-items: start;
}

.checklist {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.2rem;
    border-left: 4px solid #e94560;
}

.checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist ul li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.checklist ul li:last-child {
    border-bottom: none;
}

.checklist-products {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.2rem;
    border-left: 4px solid #ff9900;
}

.checklist-products h4 {
    color: #1a1a2e;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* Mini Product Grid – Responsive */
.mini-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
}

.mini-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.mini-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mini-product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #f0f0f0;
}

.mini-product-card .mini-content {
    padding: 0.6rem 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mini-product-card .mini-content h5 {
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
    color: #1a1a2e;
    line-height: 1.3;
}

.mini-product-card .mini-content .mini-price {
    font-weight: 700;
    color: #e94560;
    font-size: 0.85rem;
}

.mini-product-card .mini-content .mini-rating {
    color: #f39c12;
    font-size: 0.75rem;
}

.mini-product-card .mini-content .mini-btn {
    display: inline-block;
    background: #ff9900;
    color: #fff;
    text-align: center;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    transition: background 0.3s;
    margin-top: auto;
    min-height: 36px;
    min-width: 36px;
}

.mini-product-card .mini-content .mini-btn:hover {
    background: #e68a00;
}

/* ============================================================
   PRODUCTS PAGE
   ============================================================ */
.products-page h1 {
    font-size: 1.8rem;
    color: #1a1a2e;
    margin-bottom: 0.3rem;
}

.products-page > p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.main-grid-section {
    margin-top: 2.5rem;
}

.main-grid-section h2 {
    font-size: 1.4rem;
    color: #1a1a2e;
}

/* ============================================================
   FOOTER – Responsive
   ============================================================ */
footer {
    background: #1a1a2e;
    color: #fff;
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 1.5rem;
}

footer a {
    color: #ff9900;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablets */
@media (max-width: 992px) {
    .product-detail > div {
        grid-template-columns: 1fr !important;
    }

    .checklist-container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .mini-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* Mobile Landscape & Small Tablets */
@media (max-width: 768px) {
    /* Header */
    header {
        padding: 0.6rem 0.8rem;
    }

    nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .logo {
        font-size: 1rem;
    }

    nav ul {
        gap: 0.8rem;
    }

    nav ul li a {
        font-size: 0.85rem;
        padding: 0.2rem 0.4rem;
    }

    /* Hero */
    .hero {
        padding: 2rem 1.2rem;
        margin-bottom: 1.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero-hint {
        font-size: 0.85rem;
    }

    /* Sidebar Toggle */
    .sidebar-toggle {
        top: 65px;
        left: 8px;
        font-size: 0.8rem;
        padding: 8px 12px;
        min-height: 40px;
        min-width: 40px;
    }

    .sidebar {
        width: 280px;
        max-width: 80vw;
        left: -300px;
        padding: 16px 12px;
    }

    .sidebar ul li {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }

    .product-card img {
        height: 170px;
    }

    .product-card .content {
        padding: 1rem;
    }

    .product-card .btn-group {
        flex-direction: column;
        gap: 0.4rem;
    }

    .product-card .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-height: 40px;
    }

    /* Product Detail */
    .product-detail {
        padding: 1.2rem;
    }

    .product-detail .detail-price {
        font-size: 1.5rem;
    }

    .product-detail .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    /* Product Detail grid */
    .product-detail > div {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }

    /* Main */
    main {
        padding: 0.8rem;
    }

    /* Products page */
    .products-page h1 {
        font-size: 1.5rem;
    }

    .main-grid-section h2 {
        font-size: 1.2rem;
    }

    /* Checklist */
    .checklist-section {
        padding: 1rem;
        margin: 1rem 0;
    }

    .checklist-section h2 {
        font-size: 1.1rem;
    }

    .checklist {
        padding: 0.8rem;
    }

    .checklist ul li {
        font-size: 0.85rem;
        padding: 0.3rem 0;
    }

    .checklist-products {
        padding: 0.8rem;
    }

    .checklist-products h4 {
        font-size: 0.85rem;
    }

    .mini-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6rem;
    }

    .mini-product-card img {
        height: 100px;
    }

    .mini-product-card .mini-content h5 {
        font-size: 0.75rem;
    }

    .mini-product-card .mini-content .mini-price {
        font-size: 0.8rem;
    }

    .mini-product-card .mini-content .mini-btn {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        min-height: 34px;
    }

    /* Footer */
    footer {
        padding: 1.2rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Disclosure */
    .disclosure {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
        margin: 1rem 0;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 1rem auto;
        gap: 0.8rem;
    }

    .product-card img {
        height: 190px;
    }

    .hero h1 {
        font-size: 1.3rem;
    }

    .hero {
        padding: 1.5rem 1rem;
    }

    .sidebar-toggle {
        top: 60px;
        left: 6px;
        font-size: 0.75rem;
        padding: 6px 10px;
        min-height: 36px;
        min-width: 36px;
    }

    .sidebar {
        width: 260px;
        max-width: 85vw;
        left: -280px;
        padding: 14px 10px;
    }

    .sidebar ul li {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .sidebar-header h3 {
        font-size: 1rem;
    }

    .sidebar .close-btn {
        font-size: 1.4rem;
        min-height: 36px;
        min-width: 36px;
    }

    .products-page h1 {
        font-size: 1.3rem;
    }

    .mini-product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .mini-product-card img {
        height: 80px;
    }

    .product-detail .detail-price {
        font-size: 1.3rem;
    }

    .disclosure {
        font-size: 0.7rem;
        padding: 0.5rem 0.6rem;
    }

    nav ul {
        gap: 0.6rem;
    }

    nav ul li a {
        font-size: 0.8rem;
    }

    .logo {
        font-size: 0.9rem;
    }
}

/* Very Small Screens (<= 360px) */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .mini-product-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 240px;
        max-width: 90vw;
    }

    .hero h1 {
        font-size: 1.1rem;
    }

    .product-card h3 {
        font-size: 0.95rem;
    }

    .product-card .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

/* ============================================================
   UTILITY – Touch-friendly scrolling
   ============================================================ */
.sidebar,
.product-grid,
.mini-product-grid {
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   SCROLLBAR STYLING (optional)
   ============================================================ */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 10px;
}