/*
Theme Name: Hamid Storefront
Theme URI: https://github.com/rh5920326-a11y/hamid-reseller-system
Author: Hamid Development Team
Author URI: https://github.com/rh5920326-a11y
Description: Ultra-fast, lightweight, custom-coded responsive storefront theme engineered for high conversion rates without page builders.
Version: 1.0.3
License: GNU General Public License v2 or later
Text Domain: hamid-storefront
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #fafafa;
    --text-main: #09090b;
    --primary: #facc15;
    --primary-hover: #eab308;
    --card-bg: #ffffff;
    --border-color: #e4e4e7;
    --brand-black: #000000;
}

/* Non-admin clean frontend: prevent any WP admin-bar top gap */
html:not(.wp-toolbar) {
    margin-top: 0 !important;
}
body:not(.wp-admin) {
    margin-top: 0 !important;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    font-size: 22px;
    font-weight: 800;
    color: #09090b;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.site-nav a {
    text-decoration: none;
    color: #52525b;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: #000000;
}

.btn-nav-portal {
    background: #000000;
    color: #facc15 !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.btn-nav-portal:hover {
    background: #18181b;
    color: #fde047 !important;
}

/* Product Grid */
.catalog-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.hero-banner {
    background: linear-gradient(135deg, #000000 0%, #18181b 50%, #000000 100%);
    color: #ffffff;
    padding: 50px 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid rgba(250, 204, 21, 0.25);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
}

.hero-banner h1 {
    font-size: 36px;
    margin: 0 0 10px 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-banner p {
    font-size: 16px;
    color: #d4d4d8;
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 14px;
    }
}

.product-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    border-color: rgba(250, 204, 21, 0.5);
}

.product-thumb {
    width: 100%;
    height: 175px;
    object-fit: cover;
    background: #f4f4f5;
}

.product-info {
    padding: 12px 10px 14px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #09090b;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: #000000;
}

.old-price {
    font-size: 14px;
    color: #a1a1aa;
    text-decoration: line-through;
}

.btn-buy-now {
    margin-top: auto;
    background: #facc15;
    color: #000000;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

.btn-buy-now:hover {
    background: #eab308;
    color: #000000;
}

.product-thumb-wrapper {
    position: relative;
    overflow: hidden;
    background: #f4f4f5;
}

.product-thumb-wrapper .product-thumb {
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumb-wrapper .product-thumb {
    transform: scale(1.05);
}

.hamid-cart-count-badge {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-bump {
    animation: cartBounce 0.35s ease;
}

/* Lighting-style smooth blinking pulse on cart icon with brand yellow glow */
@keyframes cartLightingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.8), 0 0 10px rgba(250, 204, 21, 0.9);
        transform: scale(1);
    }
    30% {
        box-shadow: 0 0 0 12px rgba(250, 204, 21, 0), 0 0 25px rgba(250, 204, 21, 1);
        transform: scale(1.12);
        background-color: #facc15 !important;
        color: #000000 !important;
    }
    60% {
        box-shadow: 0 0 0 18px rgba(250, 204, 21, 0), 0 0 14px rgba(250, 204, 21, 0.5);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0), 0 0 0 rgba(250, 204, 21, 0);
        transform: scale(1);
    }
}

.cart-lighting-pulse {
    animation: cartLightingPulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) 3 !important;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); background-color: #facc15; color: #000000; }
}

.cart-badge-bounce {
    animation: badgeBounce 0.5s ease;
}

/* Mobile 2-Column Grid Optimization for Store Page */
@media (max-width: 639px) {
    .catalog-container {
        padding: 0 8px !important;
        margin: 8px auto 20px auto !important;
    }
    .catalog-container.single-product-container {
        padding: 0 6px !important;
        margin: 2px auto 16px auto !important;
    }
    .single-product-card {
        padding: 10px 8px !important;
        border-radius: 12px !important;
    }
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .product-card {
        border-radius: 14px !important;
    }
    .product-card .product-thumb-wrapper .product-thumb {
        height: 140px !important;
    }
    .product-card .product-info {
        padding: 10px 8px !important;
    }
    .product-card .product-title {
        font-size: 12px !important;
        line-height: 1.3 !important;
        min-height: 32px !important;
        margin-bottom: 4px !important;
    }
    .product-card .product-pricing {
        margin-bottom: 8px !important;
        gap: 4px !important;
    }
    .product-card .current-price {
        font-size: 14px !important;
    }
    .product-card .old-price {
        font-size: 10px !important;
    }
    .product-card .product-action-bar {
        padding-top: 8px !important;
        gap: 6px !important;
    }
    .product-card .product-action-bar button,
    .product-card .product-action-bar a {
        padding: 6px 4px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }
}

.site-footer {
    background: #000000;
    color: #a1a1aa;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    font-size: 13px;
    border-top: 1px solid rgba(250, 204, 21, 0.2);
}

/* Custom App Pages & Mobile Overflow Shield */
.custom-app-page,
.page-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (max-width: 639px) {
    .custom-app-page {
        padding: 10px 0 !important;
    }
}
