/* POSLK Premium Shop Styles */
.shop-premium {
    --shop-primary: #0ea5e9;
    --shop-primary-dark: #0369a1;
    --shop-accent: #8b5cf6;
    --shop-success: #10b981;
    --shop-danger: #ef4444;
    --shop-warning: #f59e0b;
    --shop-whatsapp: #25d366;
    --shop-bg: #f8fafc;
    --shop-card: #ffffff;
    --shop-text: #0f172a;
    --shop-muted: #64748b;
    --shop-border: #e2e8f0;
    --shop-radius: 16px;
    --shop-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shop-shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.shop-premium {
    background: var(--shop-bg);
    min-height: 100vh;
}

/* Hero */
.shop-hero {
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 50%, #1e40af 100%);
    color: #fff;
    padding: 48px 0 56px;
    margin-top: -80px;
    padding-top: 128px;
    position: relative;
    overflow: hidden;
}

.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.shop-hero .container {
    position: relative;
    z-index: 1;
}

.shop-hero-content {
    max-width: 640px;
}

.shop-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.shop-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 24px;
}

.shop-hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.shop-hero-stat {
    text-align: center;
}

.shop-hero-stat .num {
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
}

.shop-hero-stat .lbl {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Breadcrumb */
.shop-breadcrumb {
    padding: 16px 0;
    font-size: 0.9rem;
}

.shop-breadcrumb a {
    color: var(--shop-primary);
    text-decoration: none;
}

.shop-breadcrumb a:hover {
    text-decoration: underline;
}

.shop-breadcrumb span {
    color: var(--shop-muted);
    margin: 0 8px;
}

/* Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    padding: 32px 0 60px;
}

/* Sidebar */
.shop-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-card {
    background: var(--shop-card);
    border-radius: var(--shop-radius);
    padding: 24px;
    box-shadow: var(--shop-shadow);
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h3 i {
    color: var(--shop-primary);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 4px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--shop-text);
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.95rem;
}

.category-list a:hover,
.category-list a.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--shop-primary);
    font-weight: 500;
}

.category-list .count {
    background: var(--shop-bg);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--shop-muted);
}

.category-list a.active .count {
    background: var(--shop-primary);
    color: #fff;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--shop-muted);
}

.trust-badge i {
    width: 36px;
    height: 36px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--shop-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main content */
.shop-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.shop-results-info {
    color: var(--shop-muted);
    font-size: 0.95rem;
}

.shop-results-info strong {
    color: var(--shop-text);
}

.shop-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.shop-search-form {
    display: flex;
    gap: 8px;
    background: var(--shop-card);
    border-radius: 12px;
    padding: 6px;
    box-shadow: var(--shop-shadow);
}

.shop-search-form input {
    border: none;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    min-width: 220px;
    outline: none;
    border-radius: 8px;
}

.shop-search-form button {
    background: var(--shop-primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.shop-sort select {
    padding: 12px 16px;
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    font-family: inherit;
    background: var(--shop-card);
    cursor: pointer;
    box-shadow: var(--shop-shadow);
}

.view-toggle {
    display: flex;
    background: var(--shop-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shop-shadow);
}

.view-toggle button {
    border: none;
    background: transparent;
    padding: 10px 14px;
    cursor: pointer;
    color: var(--shop-muted);
    transition: 0.2s;
}

.view-toggle button.active {
    background: var(--shop-primary);
    color: #fff;
}

/* Product Grid */
.products-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.products-grid-premium.list-view {
    grid-template-columns: 1fr;
}

.product-card-premium {
    background: var(--shop-card);
    border-radius: var(--shop-radius);
    overflow: hidden;
    box-shadow: var(--shop-shadow);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card-premium:hover {
    transform: translateY(-6px);
    box-shadow: var(--shop-shadow-hover);
}

.products-grid-premium.list-view .product-card-premium {
    flex-direction: row;
}

.products-grid-premium.list-view .product-card-image {
    width: 220px;
    min-width: 220px;
    height: 200px;
}

.products-grid-premium.list-view .product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card-image {
    position: relative;
    height: 240px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.4s ease;
}

.product-card-premium:hover .product-card-image img {
    transform: scale(1.06);
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.product-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sale {
    background: var(--shop-danger);
    color: #fff;
}

.badge-featured {
    background: var(--shop-warning);
    color: #fff;
}

.badge-stock {
    background: var(--shop-success);
    color: #fff;
}

.badge-stock.low {
    background: var(--shop-warning);
}

.badge-stock.out {
    background: var(--shop-muted);
}

.product-quick-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s;
}

.product-card-premium:hover .product-quick-actions {
    opacity: 1;
    transform: translateY(0);
}

.quick-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--shop-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    text-decoration: none;
}

.quick-btn:hover {
    background: var(--shop-primary);
    color: #fff;
}

.quick-btn.whatsapp:hover {
    background: var(--shop-whatsapp);
}

.product-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category-tag {
    font-size: 0.75rem;
    color: var(--shop-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--shop-text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: inherit;
    text-decoration: none;
}

.product-card-title a:hover {
    color: var(--shop-primary);
}

.product-card-desc {
    font-size: 0.85rem;
    color: var(--shop-muted);
    margin-bottom: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.price-current {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--shop-primary);
}

.price-original {
    font-size: 0.95rem;
    color: var(--shop-muted);
    text-decoration: line-through;
}

.product-card-actions {
    display: flex;
    gap: 8px;
}

.btn-shop {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
    text-decoration: none;
    border: none;
}

.btn-shop-primary {
    background: var(--shop-primary);
    color: #fff;
}

.btn-shop-primary:hover {
    background: var(--shop-primary-dark);
}

.btn-shop-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-shop-outline {
    background: transparent;
    color: var(--shop-primary);
    border: 2px solid var(--shop-primary);
}

.btn-shop-outline:hover {
    background: var(--shop-primary);
    color: #fff;
}

.btn-shop-whatsapp {
    background: var(--shop-whatsapp);
    color: #fff;
}

.btn-shop-whatsapp:hover {
    background: #128c7e;
}

/* Empty state */
.shop-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--shop-card);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
}

.shop-empty i {
    font-size: 4rem;
    color: var(--shop-border);
    margin-bottom: 20px;
}

.shop-empty h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.shop-empty p {
    color: var(--shop-muted);
    margin-bottom: 24px;
}

/* Mobile category pills */
.mobile-categories {
    display: none;
    overflow-x: auto;
    gap: 10px;
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-categories::-webkit-scrollbar {
    display: none;
}

.mobile-cat-pill {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 24px;
    background: var(--shop-card);
    color: var(--shop-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shop-shadow);
    white-space: nowrap;
    transition: 0.2s;
}

.mobile-cat-pill.active,
.mobile-cat-pill:hover {
    background: var(--shop-primary);
    color: #fff;
}

/* WhatsApp float */
.shop-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--shop-whatsapp);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: 0.3s;
    text-decoration: none;
}

.shop-whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Shop body overrides */
body.shop-premium {
    padding-top: 70px;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* Mobile sticky search/filter bar */
.mobile-shop-bar {
    display: none;
}

.mobile-filter-sheet,
.filter-sheet-overlay {
    display: none;
}

.mobile-filter-sheet,
.filter-sheet-overlay {
    display: none !important;
}

@media (max-width: 992px) {
    .mobile-shop-bar {
        display: flex;
        gap: 10px;
        align-items: center;
        position: sticky;
        top: 70px;
        z-index: 90;
        background: var(--shop-bg);
        padding: 10px 0 6px;
        margin-bottom: 4px;
    }

    .mobile-search {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--shop-card);
        border-radius: 12px;
        padding: 0 14px;
        box-shadow: var(--shop-shadow);
        min-height: 48px;
    }

    .mobile-search i {
        color: var(--shop-muted);
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .mobile-search input {
        flex: 1;
        border: none;
        outline: none;
        font-family: inherit;
        font-size: 16px;
        padding: 12px 0;
        background: transparent;
        min-width: 0;
        -webkit-appearance: none;
    }

    .mobile-search .clear-search {
        color: var(--shop-muted);
        padding: 8px;
        text-decoration: none;
    }

    .mobile-filter-btn {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        border: none;
        background: var(--shop-primary);
        color: #fff;
        font-size: 1rem;
        cursor: pointer;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
    }

    .mobile-filter-sheet.open {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-radius: 20px 20px 0 0;
        z-index: 1100;
        transform: translateY(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 70vh;
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom, 16px);
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
    }

    .filter-sheet-overlay.open {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 1050;
    }

    .filter-sheet-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid var(--shop-border);
    }

    .filter-sheet-head h3 {
        font-size: 1.1rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .filter-sheet-head button {
        background: #f1f5f9;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1rem;
    }

    .filter-sheet-body {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .filter-sheet-body label {
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--shop-text);
        margin-top: 8px;
    }

    .filter-sheet-body select {
        padding: 14px 16px;
        border: 1px solid var(--shop-border);
        border-radius: 12px;
        font-family: inherit;
        font-size: 1rem;
        background: #fff;
        appearance: auto;
    }

    .filter-apply-btn {
        margin-top: 16px;
        padding: 16px;
        background: var(--shop-primary);
        color: #fff;
        border: none;
        border-radius: 12px;
        font-family: inherit;
        font-weight: 700;
        font-size: 1rem;
        cursor: pointer;
    }

    /* Hide desktop toolbar on mobile */
    .shop-main-header .shop-toolbar {
        display: none;
    }

    .shop-main-header {
        margin-bottom: 12px;
    }

    .shop-results-info {
        font-size: 0.88rem;
    }

    .shop-breadcrumb {
        font-size: 0.82rem;
        padding: 10px 0;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        display: none;
    }

    .mobile-categories {
        display: flex;
        scroll-snap-type: x mandatory;
        padding: 8px 0 12px;
        margin: 0 -4px;
    }

    .mobile-cat-pill {
        scroll-snap-align: start;
        padding: 12px 20px;
        font-size: 0.88rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .shop-hero {
        padding-top: 90px;
        padding-bottom: 28px;
    }

    .shop-hero h1 {
        font-size: 1.6rem;
    }

    .shop-hero p {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }

    .shop-hero-stats {
        gap: 16px;
        justify-content: center;
    }

    .shop-hero-stat .num {
        font-size: 1.4rem;
    }

    .shop-hero-stat .lbl {
        font-size: 0.78rem;
    }

    .shop-layout {
        padding: 16px 0 48px;
    }

    .shop-whatsapp-float {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        width: 54px;
        height: 54px;
        font-size: 1.6rem;
    }
}

@media (max-width: 640px) {
    body.shop-premium {
        padding-top: 60px;
    }

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

    .product-card-premium {
        border-radius: 14px;
    }

    .product-card-image {
        height: 140px;
    }

    .product-card-image img {
        padding: 12px;
    }

    .product-badges {
        top: 8px;
        left: 8px;
    }

    .product-badge {
        padding: 3px 8px;
        font-size: 0.62rem;
    }

    .product-card-body {
        padding: 12px 10px 14px;
    }

    .product-category-tag {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }

    .product-card-title {
        font-size: 0.82rem;
        min-height: 2.4em;
        -webkit-line-clamp: 2;
        margin-bottom: 6px;
    }

    .product-card-desc {
        display: none;
    }

    .product-card-price {
        margin-bottom: 10px;
    }

    .price-current {
        font-size: 1rem;
    }

    .price-original {
        font-size: 0.78rem;
    }

    .product-card-actions {
        flex-direction: row;
        gap: 6px;
    }

    .btn-shop {
        padding: 10px 8px;
        font-size: 0.75rem;
        min-height: 40px;
        border-radius: 8px;
    }

    .btn-shop i {
        font-size: 0.85rem;
    }

    /* Mobile: hide image overlay quick actions — use card footer buttons */
    body.shop-premium .product-quick-actions {
        display: none !important;
    }

    .shop-main-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .shop-search-form input {
        min-width: 0;
        flex: 1;
    }

    .products-grid-premium.list-view .product-card-premium {
        flex-direction: column;
    }

    .products-grid-premium.list-view .product-card-image {
        width: 100%;
        height: 160px;
    }

    .mobile-shop-bar {
        top: 60px;
    }

    .shop-hero {
        padding-top: 76px;
        padding-bottom: 20px;
    }

    .shop-hero h1 {
        font-size: 1.35rem;
    }

    .shop-hero-stats {
        gap: 12px;
    }

    .shop-hero-stat {
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 400px) {
    .products-grid-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card-image {
        height: 120px;
    }

    .btn-shop span,
    .btn-shop .btn-text {
        display: none;
    }

    .btn-shop {
        flex: 1;
        justify-content: center;
    }

    .product-card-actions .btn-shop-outline {
        flex: 0 0 40px;
        padding: 10px;
    }
}

@media (max-width: 360px) {
    .shop-hero-stats {
        flex-wrap: wrap;
    }

    .mobile-cat-pill {
        padding: 10px 16px;
        font-size: 0.82rem;
    }
}
