/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f9fafb;
    /* Gray 50 */
    padding-bottom: 60px;
    /* Space for sticky button */
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 600px;
    /* Mobile focused max-width */
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.font-bold {
    font-weight: 700;
}

.text-gray {
    color: #6b7280;
}

/* Header */
.site-header {
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--accent-color, #171717);
}

.nav-link {
    font-size: 0.9rem;
    color: #4b5563;
    margin-left: 1rem;
}

.cart-icon {
    position: relative;
    color: #4b5563;
    transition: color 0.2s;
}

.cart-icon:hover {
    color: var(--accent-color, #171717);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Hamburger Button */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background: var(--accent-color, #171717);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-btn:hover span {
    background: var(--primary-color, #525252);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Panel */
.menu-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 999;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.menu-panel.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
    transition: color 0.2s;
}

.menu-close:hover {
    color: #171717;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.menu-item {
    display: block;
    padding: 1rem 1.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: #f9fafb;
    color: var(--accent-color, #171717);
    border-left-color: var(--primary-color, #525252);
}

/* Product Grid (Home) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: #e5e7eb;
}

.product-info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #111;
}

.product-price {
    color: var(--price-color, #1f2937);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.btn-detail {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    background: #f3f4f6;
    color: #374151;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-detail:hover {
    background: #e5e7eb;
}

/* Product Detail */
.product-detail-page {
    background: white;
    min-height: 100vh;
}

.detail-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    max-height: 400px;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
}

.thumbnail-item:hover {
    border-color: #d1d5db;
}

.thumbnail-item.active {
    border-color: var(--primary-color, #525252);
    box-shadow: 0 0 0 1px var(--primary-color, #525252);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    padding: 1.5rem 1rem;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.detail-price {
    font-size: 1.25rem;
    color: var(--price-color, #1f2937);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.detail-description {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Variations */
.variation-group {
    margin-bottom: 1.5rem;
}

.variation-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variation-radio {
    display: none;
}

.variation-option {
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.variation-radio:checked+.variation-option {
    background: var(--variant-color, #f97316);
    color: white;
    border-color: var(--variant-color, #f97316);
}

/* Sticky Action Bar */
.sticky-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.75rem 1rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 0.75rem;
    z-index: 50;
    max-width: 600px;
    margin: 0 auto;
}

.btn-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: #171717;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    background: #404040;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: #25D366;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Mobile Optimizations */
@media (min-width: 601px) {
    .container {
        border-left: 1px solid #f3f4f6;
        border-right: 1px solid #f3f4f6;
        min-height: 100vh;
        background: white;
    }

    body {
        background: #f3f4f6;
    }
}