/* ========== URAH TECH – PROFESSIONAL MOBILE-FIRST ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #1a1a1a; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0; }
h1, h2, h3, h4 { letter-spacing: -0.01em; }

/* NAV */
.navbar { background: #fff; border-bottom: 1px solid #e0e0e0; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(15,23,42,0.04); }
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; max-width: 1200px; margin: 0 auto; }
.logo { display: flex; align-items: center; }
.logo-img { height: 50px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a { font-size: 0.8rem; font-weight: 500; color: #555; padding: 8px 10px; border-radius: 4px; white-space: nowrap; }
.nav-links a.active { color: #1a1a1a; background: #f0f0f0; }
.cart-link { position: relative; }
.cart-count { position: absolute; top: -4px; right: -6px; background: #e53935; color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* HERO */
.hero { background: #fff; padding: 24px 12px; text-align: center; border-bottom: 1px solid #e0e0e0; }
.hero h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.hero p { font-size: 0.9rem; color: #666; margin-bottom: 16px; }

/* BUTTONS */
.btn { display: inline-block; padding: 12px 24px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-align: center; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease; }
.btn-primary { background: #a1372c; color: #fff; width: 100%; box-shadow: 0 2px 8px rgba(161,55,44,0.25); }
.btn-primary:hover { background: #8a2e24; box-shadow: 0 4px 14px rgba(161,55,44,0.32); }
.btn-secondary { background: #fff; color: #1a1a1a; border: 1px solid #ccc; }
.btn-success { background: #10b981; color: #fff; width: 100%; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; width: auto; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* SECTION HEADER */
.section-header { padding: 16px 12px 8px; }
.section-header h2 { font-size: 1.1rem; font-weight: 700; }
.section-header p { font-size: 0.8rem; color: #666; }

/* PRODUCT LIST (MOBILE) */
.products-grid { display: flex; flex-direction: column; background: #fff; }
.product-card { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid #eee; align-items: center; }
.product-card:active { background: #fafafa; }
.product-image { width: 90px; height: 90px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-details { flex: 1; min-width: 0; }
.product-category { font-size: 0.65rem; text-transform: uppercase; color: #888; font-weight: 600; }
.product-name { font-size: 0.9rem; font-weight: 600; line-height: 1.3; margin: 2px 0; }
.product-price { font-size: 1.1rem; font-weight: 700; color: #1a1a1a; }
.stock-badge { font-size: 0.7rem; font-weight: 600; }
.in-stock { color: #10b981; }
.out-of-stock { color: #999; }

/* PRODUCT LIST (MOBILE - for index.php) */
.product-list { display: flex; flex-direction: column; }
.product-list-item { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid #eee; align-items: center; background: #fff; text-decoration: none; color: inherit; position: relative; }
.product-list-item:active { background: #fafafa; }
.product-list-img { width: 90px; height: 90px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; }
.product-list-img img { width: 100%; height: 100%; object-fit: cover; }
.product-list-img .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #999; }
.product-list-info { flex: 1; min-width: 0; }
.list-cat { font-size: 0.65rem; text-transform: uppercase; color: #888; font-weight: 600; }
.product-list-info h3 { font-size: 0.9rem; font-weight: 600; line-height: 1.3; margin: 2px 0; }
.list-price { font-size: 1.1rem; font-weight: 700; color: #1a1a1a; }
.product-list-arrow { color: #ccc; font-size: 1.2rem; flex-shrink: 0; }
.new-badge { position: absolute; top: 8px; left: 8px; background: #f59e0b; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; z-index: 1; }
.view-all-link { display: block; text-align: center; padding: 14px; color: #a1372c; font-weight: 600; font-size: 0.85rem; text-decoration: none; background: #fff; border-top: 1px solid #eee; }

/* FEATURED GRID (MOBILE) */
.featured-grid { display: flex; flex-direction: column; background: #fff; }
.featured-grid .product-list-item { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid #eee; align-items: center; }
.featured-grid .product-list-item:active { background: #fafafa; }
.featured-grid .product-list-img { width: 90px; height: 90px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; }
.featured-grid .product-list-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-grid .product-list-img .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #999; }
.featured-grid .product-list-info { flex: 1; min-width: 0; }
.featured-grid .list-cat { font-size: 0.65rem; text-transform: uppercase; color: #888; font-weight: 600; }
.featured-grid .product-list-info h3 { font-size: 0.9rem; font-weight: 600; line-height: 1.3; margin: 2px 0; }
.featured-grid .list-price { font-size: 1.1rem; font-weight: 700; }
.featured-grid .product-list-arrow { color: #ccc; font-size: 1.2rem; }
.view-all { display: block; text-align: center; padding: 14px; color: #a1372c; font-weight: 600; font-size: 0.85rem; background: #fff; border-top: 1px solid #eee; }

/* CATEGORY LIST (MOBILE) */
.category-selector-grid { display: flex; flex-direction: column; gap: 1px; background: #e0e0e0; }
.category-list-item { display: flex; align-items: center; gap: 12px; padding: 14px 12px; background: #fff; }
.category-list-item:active { background: #fafafa; }
.cat-icon { width: 40px; height: 40px; background: #fbf0ee; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-info { flex: 1; }
.cat-info h4 { font-size: 0.9rem; font-weight: 600; }
.cat-info p { font-size: 0.75rem; color: #888; }
.cat-arrow { color: #ccc; font-size: 1.2rem; }

/* ADVERT (MOBILE) */
.advert-grid { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; background: #fff; }
.advert-full { width: 100%; aspect-ratio: 16/9; background: #1a1a1a; position: relative; overflow: hidden; }
.advert-full video, .advert-full img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.advert-full .advert-placeholder { color: #fff; display: flex; align-items: center; justify-content: center; height: 100%; font-size: 0.85rem; }
.advert-side-list { display: flex; gap: 8px; padding: 0 8px; }
.advert-side-item { flex: 1; aspect-ratio: 16/9; background: #f5f5f5; position: relative; overflow: hidden; border-radius: 4px; }
.advert-side-item img { width: 100%; height: 100%; object-fit: cover; position: absolute; }
.advert-side-item .advert-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 0.7rem; color: #999; }

/* PRODUCT DETAIL */
.product-detail { padding: 12px; background: #fff; }
.main-display { width: 100%; aspect-ratio: 1/1; background: #f5f5f5; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.main-display img { width: 100%; height: 100%; object-fit: contain; }
.product-info h1 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.product-price { font-size: 1.4rem; font-weight: 700; margin: 8px 0; }
.stock-status-container { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.stock-badge-large { padding: 6px 12px; border-radius: 4px; font-weight: 600; font-size: 0.8rem; }
.stock-badge-large.in-stock { background: #e8f5e9; color: #2e7d32; }
.stock-badge-large.out-of-stock { background: #f5f5f5; color: #999; }
.quantity-selector { display: flex; align-items: center; margin: 12px 0; }
.quantity-btn { width: 40px; height: 40px; border: 1px solid #ccc; background: #fff; font-size: 1.1rem; cursor: pointer; }
.quantity-input { width: 50px; height: 40px; text-align: center; border: 1px solid #ccc; border-left: none; border-right: none; font-size: 0.95rem; }
.purchase-actions { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.wishlist-btn { display: inline-block; padding: 8px 0; font-size: 0.85rem; color: #666; }
.shipping-info { font-size: 0.8rem; color: #666; margin: 8px 0; }
.trust-badges { display: flex; gap: 12px; font-size: 0.75rem; color: #888; margin: 8px 0; }

/* TABS */
.product-tabs { background: #fff; margin-top: 8px; }
.tab-buttons { display: flex; border-bottom: 1px solid #e0e0e0; }
.tab-btn { flex: 1; padding: 12px; border: none; background: none; font-weight: 600; font-size: 0.85rem; color: #666; border-bottom: 2px solid transparent; cursor: pointer; }
.tab-btn.active { color: #1a1a1a; border-bottom-color: #a1372c; }
.tab-content { display: none; padding: 12px; }
.tab-content.active { display: block; }

/* SPECS */
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.specs-table th { background: #f5f5f5; padding: 10px; text-align: left; font-weight: 600; font-size: 0.75rem; color: #666; }
.specs-table td { padding: 10px; border-bottom: 1px solid #eee; }
.spec-label { font-weight: 600; width: 40%; }

/* META */
.product-meta { background: #fff; padding: 12px; margin-top: 8px; }
.product-meta .meta-row { display: flex; padding: 6px 0; border-bottom: 1px solid #f5f5f5; font-size: 0.85rem; }
.product-meta .meta-label { width: 100px; font-weight: 600; color: #666; }
.product-meta .meta-value { color: #1a1a1a; }

/* CART */
.cart-item { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #fff; margin-bottom: 8px; }
.cart-item-image { width: 100px; height: 100px; background: #f5f5f5; border-radius: 4px; overflow: hidden; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-summary { background: #fff; padding: 16px; margin-top: 8px; }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }

/* CHECKOUT */
.checkout-container { padding: 12px; }
.checkout-form, .order-summary { background: #fff; padding: 16px; margin-bottom: 8px; }

/* FORM */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem; -webkit-appearance: none; }

/* PROMO */
.promo-section { background: #fff; padding: 20px 12px; margin-top: 8px; border-top: 1px solid #e0e0e0; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.promo-card { text-align: center; padding: 8px; }
.promo-card h3 { font-size: 0.85rem; color: #a1372c; }
.promo-card p { font-size: 0.75rem; color: #666; }

/* TRUST BAR */
.trust-bar { background: #f8fafc; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 18px 12px; }
.trust-bar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-icon { font-size: 1.4rem; flex-shrink: 0; }
.trust-item strong { display: block; font-size: 0.78rem; color: #0f172a; }
.trust-item span { display: block; font-size: 0.7rem; color: #64748b; }

/* FOOTER */
.site-footer { background: #1a1a1a; color: #fff; padding: 24px 12px 16px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.site-footer h4 { font-size: 0.85rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 4px; }
.site-footer a { color: #999; font-size: 0.8rem; }
.footer-payments { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pay-badge { background: #2a2a2a; color: #ccc; font-size: 0.68rem; font-weight: 700; padding: 4px 8px; border-radius: 4px; letter-spacing: 0.02em; }
.footer-bottom { border-top: 1px solid #333; padding-top: 12px; text-align: center; font-size: 0.7rem; color: #666; }

/* BREADCRUMB */
.breadcrumb { padding: 10px 12px; font-size: 0.75rem; color: #888; background: #fff; overflow-x: auto; white-space: nowrap; }
.breadcrumb a { color: #a1372c; }

/* FILTER */
.filter-bar { padding: 10px 12px; background: #fff; border-bottom: 1px solid #e0e0e0; }
.filter-bar select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; background: #fff; }

/* ALERTS */
.alert { padding: 12px; margin: 8px 12px; border-radius: 4px; font-size: 0.85rem; }
.alert-error { background: #fef2f2; color: #991b1b; }
.alert-success { background: #f0fdf4; color: #166534; }

/* REVIEWS */
.review-form { background: #f5f5f5; padding: 12px; border-radius: 4px; margin-bottom: 12px; }
.review-item { padding: 10px 0; border-bottom: 1px solid #eee; }
.review-header { display: flex; justify-content: space-between; font-size: 0.8rem; }
.review-date { color: #999; font-size: 0.7rem; }

/* RATING */
.rating-summary { display: flex; align-items: center; gap: 2px; }
.star { color: #ddd; font-size: 0.9rem; }
.star.filled { color: #f59e0b; }
.rating-count { font-size: 0.75rem; color: #888; margin-left: 4px; }

/* VARIANTS */
.variant-selector, .color-selector { margin: 10px 0; }
.variant-selector label, .color-selector label { font-weight: 600; font-size: 0.85rem; display: block; margin-bottom: 4px; }
.variant-options, .color-options { display: flex; gap: 6px; flex-wrap: wrap; }
.variant-option, .color-option { padding: 8px 14px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.85rem; cursor: pointer; background: #fff; }
.variant-option.selected, .color-option.selected { border-color: #a1372c; background: #fbf0ee; color: #a1372c; }

/* RELATED */
.related-products { padding: 12px; background: #fff; margin-top: 8px; }
.related-products h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }

/* MINI GALLERY */
.mini-gallery { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; }
.mini-gallery img { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; border: 2px solid transparent; }
.mini-gallery img.active { border-color: #a1372c; }

/* SPECS SECTION */
.specs-section-visible { padding: 12px; background: #fff; margin-top: 8px; }
.specs-section-visible .section-title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }

/* FULL IMAGES */
.full-images-section { padding: 12px; background: #fff; margin-top: 8px; }
.full-images-section .section-title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.full-image { width: 100%; margin-bottom: 8px; }
.full-image img { width: 100%; }

/* EMPTY */
.empty-cart { text-align: center; padding: 40px 12px; background: #fff; }
.empty-cart h2 { font-size: 1.2rem; margin-bottom: 8px; }

/* DASHBOARD */
.dashboard-layout { display: flex; flex-direction: column; }
.sidebar { display: none; }
.dashboard-content { padding: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; background: #fff; }
.data-table th { background: #f5f5f5; padding: 8px; text-align: left; font-weight: 600; font-size: 0.7rem; color: #666; }
.data-table td { padding: 8px; border-bottom: 1px solid #eee; }

/* ========== DESKTOP ========== */
@media (min-width: 768px) {
    .container { padding: 0 16px; }
    .nav-container { padding: 12px 16px; }
    .logo-img { height: 32px; }
    .hero { padding: 32px 16px; }
    .hero h1 { font-size: 1.6rem; }
    .btn { width: auto; }
    
    .products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: none; }
    .product-card { flex-direction: column; border: 1px solid #eee; border-radius: 12px; padding: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,0.04); transition: transform 0.15s ease, box-shadow 0.15s ease; }
    .product-card:hover { box-shadow: 0 10px 24px rgba(15,23,42,0.1); transform: translateY(-3px); border-color: #f3d9d3; }
    .product-image { width: 100%; height: 180px; border-radius: 0; }
    .product-details { padding: 14px; }
    
    .product-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: none; }
    .product-list-item { flex-direction: column; border: 1px solid #eee; border-radius: 12px; padding: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,0.04); transition: transform 0.15s ease, box-shadow 0.15s ease; }
    .product-list-item:hover { box-shadow: 0 10px 24px rgba(15,23,42,0.1); transform: translateY(-3px); border-color: #f3d9d3; }
    .product-list-img { width: 100%; height: 180px; border-radius: 0; }
    .product-list-info { padding: 14px; }
    .product-list-arrow { display: none; }
    .view-all-link { display: none; }
    
    /* FIXED: Removed padding so the 4-column grid can fill the space properly */
    .featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: none; padding: 0; }
    .featured-grid .product-list-item { flex-direction: column; border: 1px solid #eee; border-radius: 12px; padding: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,0.04); transition: transform 0.15s ease, box-shadow 0.15s ease; }
    .featured-grid .product-list-item:hover { box-shadow: 0 10px 24px rgba(15,23,42,0.1); transform: translateY(-3px); border-color: #f3d9d3; }
    .featured-grid .product-list-img { width: 100%; height: 180px; border-radius: 0; }
    .featured-grid .product-list-info { padding: 14px; }
    .featured-grid .product-list-arrow { display: none; }
    .view-all { display: none; }
    
    .category-selector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: none; }
    .category-list-item { flex-direction: column; text-align: center; padding: 20px; border-radius: 8px; border: 1px solid #e0e0e0; }
    .cat-arrow { display: none; }
    
    .advert-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; padding: 0 12px; background: none; }
    .advert-full { aspect-ratio: auto; min-height: 300px; }
    .advert-side-list { flex-direction: column; padding: 0; gap: 12px; }
    
    .product-detail { flex-direction: row; gap: 20px; }
    .main-display { flex: 1; aspect-ratio: auto; max-height: 400px; }
    .product-info { flex: 1; }
    .purchase-actions { flex-direction: row; }
    
    .cart-item { flex-direction: row; align-items: center; }
    .checkout-container { flex-direction: row; }
    .checkout-form { flex: 1; }
    .order-summary { width: 300px; flex-shrink: 0; }
    
    .promo-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: repeat(4, 1fr); }
    .trust-bar-grid { grid-template-columns: repeat(4, 1fr); }
    .trust-bar { padding: 22px 16px; }
    
    .dashboard-layout { flex-direction: row; }
    .sidebar { display: block; width: 200px; background: #fff; padding: 16px; border-right: 1px solid #e0e0e0; }
    .sidebar-menu { list-style: none; }
    .sidebar-menu a { display: block; padding: 8px 10px; font-size: 0.85rem; color: #555; border-radius: 4px; }
    .sidebar-menu a:hover, .sidebar-menu a.active { background: #f0f0f0; color: #1a1a1a; font-weight: 600; }
    .dashboard-content { flex: 1; padding: 20px; }
}

@media (min-width: 1024px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    .product-list { grid-template-columns: repeat(4, 1fr); }
    .featured-grid { grid-template-columns: repeat(4, 1fr); }
}