/* Shop Page Layout with Sidebar */
.shop-container {
    display: flex;
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 30px;
}

/* Sidebar Styling */
.shop-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #eef0f3;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    align-self: flex-start;
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 22px;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 18px;
}
.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #111;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.filter-title i { font-size: 11px; color: #999; }

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Checkboxes */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: #444;
    transition: color 0.2s;
}
.filter-checkbox:hover { color: #000; }
.filter-checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #00bcd4;
    cursor: pointer;
    border-radius: 3px;
}

/* Color Swatches */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.color-swatch.active {
    border-color: #000;
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

/* Size Pills */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.size-pill {
    padding: 5px 11px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #444;
    transition: all 0.2s;
    font-weight: 500;
}
.size-pill:hover {
    border-color: #00bcd4;
    color: #00bcd4;
}
.size-pill.active {
    background-color: #00bcd4;
    color: #fff;
    border-color: #00bcd4;
}

/* Price Range */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-range-inputs input {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    transition: border-color 0.2s;
}
.price-range-inputs input:focus {
    outline: none;
    border-color: #00bcd4;
}
.price-range-inputs span { color: #999; font-size: 12px; }
.price-apply-btn {
    width: 100%;
    margin-top: 10px;
    padding: 9px !important;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    text-transform: none !important;
    display: block !important;
    transition: background 0.2s, transform 0.2s;
}
.price-apply-btn:hover {
    background: #333 !important;
    transform: translateY(-1px);
}

/* ── Main Content Area ─────────────────────────────────────────────────────── */
.shop-main { flex-grow: 1; min-width: 0; }

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}
.shop-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.shop-header h1 {
    font-size: 22px;
    margin: 0;
    font-weight: 800;
    color: #111;
}
.product-count-badge {
    background: #f0f2f5;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.shop-sort select {
    padding: 9px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s;
    font-weight: 500;
}
.shop-sort select:focus {
    outline: none;
    border-color: #00bcd4;
}

/* ── Product Grid ──────────────────────────────────────────────────────────── */
.dynamic-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    min-height: 200px;
}

/* ── Enhanced Product Card ─────────────────────────────────────────────────── */
.pcard-enhanced {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f2f5;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.35s ease;
    position: relative;
}
.pcard-enhanced:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.10);
}
.pcard-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Image */
.pcard-img-wrap {
    height: 200px;
    background: #f8fafd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 0;
    transition: background 0.3s;
}
.pcard-enhanced:hover .pcard-img-wrap { background: #f0f4ff; }
.pcard-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    width: 160px;
    height: 160px;
    object-fit: contain;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}
.pcard-enhanced:hover .pcard-img-wrap img { transform: scale(1.08) rotate(-1deg); }

/* Discount badge on image */
.pcard-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Badges */
.pcard-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.pcard-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}
.badge-new { background: #4CAF50; color: #fff; }
.badge-deal { background: #FF6B35; color: #fff; }
.badge-limited { background: #9C27B0; color: #fff; }
.badge-bstock { background: #607D8B; color: #fff; }

/* Info */
.pcard-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.pcard-brand {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00bcd4;
    margin: 0 0 4px;
}
.pcard-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
    line-height: 1.4;
    min-height: 40px;
}

/* Stars */
.pcard-stars {
    font-size: 12px;
    color: #f5a623;
    margin-bottom: 10px;
}
.pcard-stars span {
    color: #666;
    font-size: 11px;
    margin-left: 4px;
    font-weight: 600;
}

/* Variant dots (colors) */
.pcard-variants {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}
.pcard-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.12);
    display: inline-block;
}

/* Size pills on card */
.pcard-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}
.pcard-size-pill {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    background: #f8f9fa;
}

/* Price row */
.pcard-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}
.pcard-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.pcard-price {
    font-size: 1.25em;
    font-weight: 800;
    color: #111;
}
.pcard-old-price {
    font-size: 0.9em;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 500;
}
.pcard-add-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    background: #f0f2f5 !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    color: #333 !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    font-weight: normal !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}
.pcard-enhanced:hover .pcard-add-btn {
    background: #fcd535 !important;
    color: #111 !important;
    box-shadow: 0 6px 18px rgba(252, 213, 53, 0.45) !important;
    transform: rotate(90deg) scale(1.1) !important;
}
/* Remove theme button:before pseudo-element injection */
.pcard-add-btn::before,
.pcard-add-btn::after {
    display: none !important;
    content: none !important;
}
/* Fix price-apply-btn pseudo-element too */
.price-apply-btn::before,
.price-apply-btn::after {
    display: none !important;
    content: none !important;
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}
.page-btn {
    all: unset !important;
    box-sizing: border-box !important;
    width: 40px !important;
    height: 40px !important;
    border: 1.5px solid #e5e7eb !important;
    background: #fff !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    text-transform: none !important;
    line-height: 1 !important;
}
.page-btn:hover:not(.disabled):not(.active) {
    border-color: #00bcd4 !important;
    color: #00bcd4 !important;
    background: #f0fbfc !important;
}
.page-btn.active {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}
.page-btn.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}
.page-ellipsis {
    color: #aaa;
    font-size: 16px;
    padding: 0 4px;
    line-height: 40px;
}

/* ── Toast Notification ─────────────────────────────────────────────────────── */
#shop-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #111;
    color: #fff;
    padding: 13px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.35s ease;
    white-space: nowrap;
}
#shop-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Loader ─────────────────────────────────────────────────────────────────── */
.shop-loader {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}
.loader-ring {
    width: 42px;
    height: 42px;
    border: 3px solid #f0f2f5;
    border-top-color: #00bcd4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .dynamic-products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .shop-container { flex-direction: column; }
    .shop-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    .dynamic-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .shop-header { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 480px) {
    .dynamic-products-grid { grid-template-columns: 1fr; }
}
