/**
 * PBFH PBFH Shop, Cart & Checkout - Premium Edition
 * 
 * A clean, elegant, premium design system
 * Supports both light and dark backgrounds
 * 
 * @package pbfh_PBFH
 * @since 6.4.5
 */

/* ==========================================================================
   CSS Variables - Design Tokens
   ========================================================================== */
:root {
    /* Primary Brand Colors */
    --pbfh-shop-primary: #6366f1;
    --pbfh-shop-primary-hover: #818cf8;
    --pbfh-shop-primary-light: rgba(99, 102, 241, 0.15);
    --pbfh-shop-primary-glow: rgba(99, 102, 241, 0.4);
    
    /* Success/CTA Colors */
    --pbfh-shop-success: #10b981;
    --pbfh-shop-success-hover: #34d399;
    --pbfh-shop-success-glow: rgba(16, 185, 129, 0.4);
    
    /* Accent Colors */
    --pbfh-shop-danger: #ef4444;
    --pbfh-shop-warning: #f59e0b;
    
    /* Sidebar - defaults that get overridden by Visual Designer */
    --pbfh-shop-sidebar-active-bg: #6366f1;
    --pbfh-shop-sidebar-active-text: #ffffff;
    --pbfh-shop-sidebar-bg: rgba(255, 255, 255, 0.03);
    --pbfh-shop-sidebar-border: rgba(255, 255, 255, 0.1);
    
    /* Spacing & Radius */
    --pbfh-shop-radius-sm: 8px;
    --pbfh-shop-radius: 12px;
    --pbfh-shop-radius-lg: 16px;
    --pbfh-shop-radius-xl: 24px;
    
    /* Transitions */
    --pbfh-shop-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --pbfh-shop-transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Wrapper Styles - Works on ANY Background
   ========================================================================== */
.pbfh-shop-wrapper,
.pbfh-cart-wrapper,
.pbfh-checkout-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pbfh-shop-wrapper *,
.pbfh-cart-wrapper *,
.pbfh-checkout-wrapper * {
    box-sizing: border-box;
}

/* ==========================================================================
   PREMIUM CARD SYSTEM - Glass Morphism Effect
   ========================================================================== */
.pbfh-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pbfh-shop-radius-xl);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   SHARED BUTTON STYLES
   ========================================================================== */
.pbfh-shop-wrapper .button,
.pbfh-cart-wrapper .button,
.pbfh-checkout-wrapper .button,
.pbfh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--pbfh-shop-radius);
    border: none;
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

/* Primary Button - Gradient with Glow */
.button-primary,
.pbfh-btn-primary {
    background: linear-gradient(135deg, var(--pbfh-shop-primary) 0%, var(--pbfh-shop-primary-hover) 100%);
    color: #ffffff !important;
    box-shadow: 
        0 4px 15px var(--pbfh-shop-primary-glow),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.button-primary:hover,
.pbfh-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px var(--pbfh-shop-primary-glow),
        0 4px 10px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* Success/CTA Button */
.button-success,
.pbfh-btn-success,
.checkout-btn {
    background: linear-gradient(135deg, var(--pbfh-shop-success) 0%, #059669 100%);
    color: #ffffff !important;
    box-shadow: 
        0 4px 15px var(--pbfh-shop-success-glow),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.button-success:hover,
.pbfh-btn-success:hover,
.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px var(--pbfh-shop-success-glow),
        0 4px 10px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* Secondary/Ghost Button */
.button-secondary,
.pbfh-btn-secondary,
.continue-shopping {
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.button-secondary:hover,
.pbfh-btn-secondary:hover,
.continue-shopping:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--pbfh-shop-primary);
    color: var(--pbfh-shop-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   EMPTY STATE - Premium Centered Card
   ========================================================================== */
.pbfh-empty-state,
.pbfh-cart-empty,
.empty-state {
    text-align: center;
    padding: 80px 40px;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbfh-shop-radius-xl);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Empty State Icon Container */
.pbfh-empty-state .empty-icon,
.empty-state-icon,
.pbfh-cart-empty .dashicons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    background: var(--pbfh-shop-primary-light, rgba(99, 102, 241, 0.15));
    border-radius: 50%;
    font-size: 48px;
    color: var(--pbfh-shop-primary);
    border: 1px solid var(--pbfh-shop-primary-light, rgba(99, 102, 241, 0.2));
}

.pbfh-empty-state .dashicons,
.empty-state-icon .dashicons,
.pbfh-cart-empty > .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    line-height: 48px;
    color: var(--pbfh-shop-primary);
    opacity: 0.9;
}

/* Empty State Typography */
.pbfh-empty-state h3,
.empty-state h3,
.pbfh-cart-empty h3 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: inherit;
    opacity: 0.95;
}

.pbfh-empty-state p,
.empty-state p,
.pbfh-cart-empty p {
    margin: 0 0 32px;
    font-size: 16px;
    opacity: 0.6;
    line-height: 1.6;
}

/* Empty State Button */
.pbfh-empty-state .button,
.empty-state .button,
.pbfh-cart-empty .button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--pbfh-shop-primary) 0%, var(--pbfh-shop-primary-hover) 100%);
    color: #ffffff !important;
    border: none;
    border-radius: var(--pbfh-shop-radius);
    text-decoration: none;
    transition: var(--pbfh-shop-transition);
    box-shadow: 
        0 4px 15px var(--pbfh-shop-primary-glow),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.pbfh-empty-state .button:hover,
.empty-state .button:hover,
.pbfh-cart-empty .button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 30px var(--pbfh-shop-primary-glow),
        0 4px 10px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* ==========================================================================
   SHOP PAGE
   ========================================================================== */

/* Shop Header */
.pbfh-shop-header {
    text-align: center;
    margin-bottom: 48px;
    padding: var(--pbfh-shop-header-padding, 20px) 0 calc(var(--pbfh-shop-header-padding, 20px) * 2);
}

.pbfh-shop-header h1,
.pbfh-shop-header .shop-title {
    margin: 0 0 12px;
    font-size: var(--pbfh-shop-header-title-size, 48px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--pbfh-shop-header-title-color, #ffffff);
    /* Remove gradient text effect to allow solid colors */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.pbfh-shop-header .shop-description {
    margin: 0 auto;
    font-size: 18px;
    color: var(--pbfh-shop-header-subtitle-color, rgba(255, 255, 255, 0.7));
    max-width: 600px;
}

/* Category Filters */
.pbfh-category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.category-pill {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.category-pill.active {
    background: linear-gradient(135deg, var(--pbfh-shop-primary) 0%, var(--pbfh-shop-primary-hover) 100%);
    border-color: transparent;
    color: #ffffff;
    opacity: 1;
    box-shadow: 0 4px 15px var(--pbfh-shop-primary-glow);
}

/* Shop Layout */
.pbfh-shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

@media (max-width: 1024px) {
    .pbfh-shop-layout {
        grid-template-columns: 1fr;
    }
}

/* Shop Sidebar */
.pbfh-shop-sidebar {
    position: sticky;
    top: 32px;
    height: fit-content;
}

.shop-filter-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbfh-shop-radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
}

.shop-filter-section h3 {
    margin: 0 0 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.category-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-filter-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 0 -8px;
    color: inherit;
    text-decoration: none;
    border-radius: var(--pbfh-shop-radius);
    font-weight: 500;
    transition: var(--pbfh-shop-transition);
    opacity: 0.7;
}

.category-filter-list a:hover {
    background: var(--pbfh-shop-primary-light);
    opacity: 1;
}

.category-filter-list li.is-active a {
    background: var(--pbfh-shop-sidebar-active-bg);
    color: var(--pbfh-shop-sidebar-active-text);
    opacity: 1;
}

.category-filter-list .count {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    opacity: 0.6;
}

/* Products Grid */
.pbfh-shop-grid,
.pbfh-products-grid {
    display: grid;
    gap: 28px;
}

.pbfh-shop-grid.columns-3,
.pbfh-products-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pbfh-shop-grid.columns-4,
.pbfh-products-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .pbfh-shop-grid.columns-3,
    .pbfh-shop-grid.columns-4,
    .pbfh-products-grid.columns-3,
    .pbfh-products-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .pbfh-shop-grid.columns-3,
    .pbfh-shop-grid.columns-4,
    .pbfh-products-grid.columns-3,
    .pbfh-products-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}

/* Product Card */
.pbfh-product-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbfh-shop-radius-lg);
    overflow: hidden;
    transition: var(--pbfh-shop-transition-slow);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

.pbfh-product-card:hover {
    border-color: var(--pbfh-shop-primary, rgba(99, 102, 241, 0.5));
    transform: translateY(-6px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 40px var(--pbfh-shop-primary-glow);
}

/* Product Image */
.product-image {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--pbfh-shop-transition-slow);
}

.pbfh-product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
}

.product-image .no-image .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    z-index: 1;
}

.badge-sale {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.badge-new {
    background: linear-gradient(135deg, var(--pbfh-shop-primary) 0%, var(--pbfh-shop-primary-hover) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--pbfh-shop-primary-glow);
}

.badge-pickup-only {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    top: auto;
    bottom: 16px;
    left: 16px;
}

.badge-out-of-stock + .badge-pickup-only {
    top: auto;
    bottom: 16px;
}

/* Product Info */
.product-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pbfh-shop-primary);
    margin-bottom: 8px;
}

.product-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--pbfh-shop-transition);
}

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

/* Product Price */
.product-price {
    margin-top: auto;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.product-price .current-price {
    font-size: 26px;
    font-weight: 800;
}

.product-price .regular-price {
    text-decoration: line-through;
    opacity: 0.4;
    font-size: 16px;
}

.product-price .sale-price {
    color: var(--pbfh-shop-danger);
}

/* Product Option Meta */
.product-option-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    font-size: 11px;
    line-height: 1.4;
}
.product-option-meta .option-label {
    color: var(--pbfh-shop-text-muted, rgba(255,255,255,0.5));
    font-weight: 500;
}
.product-option-meta .option-attr-line {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.product-option-meta .option-attr-name {
    color: var(--pbfh-shop-text-muted, rgba(255,255,255,0.6));
    font-weight: 600;
    white-space: nowrap;
}
.product-option-meta .option-attr-values {
    color: var(--pbfh-shop-text-muted, rgba(255,255,255,0.4));
}

/* Color swatches on product cards */
.option-color-swatches {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.option-color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}
.product-option-meta .option-fulfillment {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.product-option-meta .option-fulfillment .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}
.product-option-meta .option-pickup {
    background: rgba(217,119,6,0.15);
    color: #fbbf24;
}
.product-option-meta .option-ship {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
}

/* Fly-to-Cart Animation */
.pbfh-fly-to-cart {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
    font-weight: 800;
    font-size: 18px;
    color: var(--pbfh-shop-accent, #ef4444);
    background: rgba(0,0,0,0.85);
    border: 2px solid var(--pbfh-shop-accent, #ef4444);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 1;
}
.pbfh-fly-to-cart.flying {
    opacity: 0;
    transform: scale(0.3);
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--pbfh-shop-radius);
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--pbfh-shop-primary) 0%, var(--pbfh-shop-primary-hover) 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--pbfh-shop-primary-glow);
}

.add-to-cart-btn.added {
    background: linear-gradient(135deg, var(--pbfh-shop-success) 0%, #059669 100%);
    border-color: transparent;
    color: #ffffff;
}

/* Select Options Button (for variable products) */
.select-options-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--pbfh-shop-radius);
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.select-options-btn:hover {
    background: linear-gradient(135deg, var(--pbfh-shop-primary) 0%, var(--pbfh-shop-primary-hover) 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--pbfh-shop-primary-glow);
}

/* ==========================================================================
   CART PAGE
   ========================================================================== */

/* Cart Header */
.pbfh-cart-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 20px 0 40px;
}

.pbfh-cart-header h1 {
    margin: 0 0 8px;
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.pbfh-cart-header .cart-count {
    font-size: 16px;
    opacity: 0.5;
}

/* Cart Layout */
.pbfh-cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .pbfh-cart-layout {
        grid-template-columns: 1fr;
    }
}

/* Cart Items */
.pbfh-cart-items {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbfh-shop-radius-xl);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

/* Cart Table */
.pbfh-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.pbfh-cart-table th,
.pbfh-cart-table td {
    padding: 20px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.pbfh-cart-table th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.02);
}

.pbfh-cart-table tbody tr:last-child td {
    border-bottom: none;
}

.pbfh-cart-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--pbfh-shop-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-name a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.product-name a:hover {
    color: var(--pbfh-shop-primary);
}

.product-name .variation-name,
.product-name .billing-info {
    display: block;
    font-size: 13px;
    opacity: 0.5;
    font-weight: 400;
    margin-top: 4px;
}

/* Quantity Control */
.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--pbfh-shop-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    opacity: 0.6;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: inherit;
    background: transparent;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove Button */
.remove-item-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: inherit;
    cursor: pointer;
    border-radius: var(--pbfh-shop-radius);
    transition: var(--pbfh-shop-transition);
    opacity: 0.4;
}

.remove-item-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--pbfh-shop-danger);
    opacity: 1;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Cart Totals */
.pbfh-cart-totals {
    position: sticky;
    top: 32px;
}

.cart-totals-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbfh-shop-radius-xl);
    padding: 32px;
    backdrop-filter: blur(20px);
}

.cart-totals-box h2 {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 20px;
    font-weight: 700;
}

.totals-table {
    width: 100%;
    margin-bottom: 24px;
}

.totals-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.totals-table tr:last-child {
    border-bottom: none;
}

.totals-table th,
.totals-table td {
    padding: 14px 0;
}

.totals-table th {
    text-align: left;
    font-weight: 500;
    opacity: 0.6;
}

.totals-table td {
    text-align: right;
    font-weight: 600;
}

.totals-table .total-row th,
.totals-table .total-row td {
    font-size: 22px;
    font-weight: 800;
    padding-top: 20px;
    opacity: 1;
}

.cart-discount {
    color: var(--pbfh-shop-success) !important;
}

/* Coupon Section */
.coupon-section {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--pbfh-shop-radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.coupon-section h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.coupon-form {
    display: flex;
    gap: 8px;
}

.coupon-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--pbfh-shop-radius);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    transition: var(--pbfh-shop-transition);
}

.coupon-input:focus {
    outline: none;
    border-color: var(--pbfh-shop-primary);
    box-shadow: 0 0 0 4px var(--pbfh-shop-primary-light);
}

.coupon-input::placeholder {
    opacity: 0.4;
}

/* Checkout Button in Cart */
.checkout-btn {
    width: 100%;
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pbfh-shop-success) 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    border-radius: var(--pbfh-shop-radius);
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    box-shadow: 0 4px 20px var(--pbfh-shop-success-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--pbfh-shop-success-glow);
    filter: brightness(1.1);
}

/* Continue Shopping */
.continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    margin-top: 16px;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--pbfh-shop-radius);
    cursor: pointer;
    text-decoration: none;
    transition: var(--pbfh-shop-transition);
    opacity: 0.7;
}

.continue-shopping:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--pbfh-shop-primary);
    color: var(--pbfh-shop-primary);
    opacity: 1;
}

/* ==========================================================================
   CHECKOUT PAGE
   ========================================================================== */
.pbfh-checkout-wrapper {
    max-width: 1200px;
}

.pbfh-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: start;
}

@media (max-width: 1024px) {
    .pbfh-checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .pbfh-checkout-sidebar {
        order: -1;
    }
}

/* Checkout Sections */
.pbfh-checkout-wrapper .checkout-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbfh-shop-radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
}

.pbfh-checkout-wrapper .checkout-section h3 {
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pbfh-checkout-wrapper .checkout-section h3 .section-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pbfh-shop-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
}

/* Form Inputs */
.pbfh-checkout-wrapper .form-row {
    margin-bottom: 20px;
}

.pbfh-checkout-wrapper .form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    opacity: 0.8;
}

.pbfh-checkout-wrapper .form-row .required {
    color: var(--pbfh-shop-danger);
}

.pbfh-checkout-wrapper .form-row input[type="text"],
.pbfh-checkout-wrapper .form-row input[type="email"],
.pbfh-checkout-wrapper .form-row input[type="tel"],
.pbfh-checkout-wrapper .form-row select,
.pbfh-checkout-wrapper .form-row textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--pbfh-shop-radius);
    font-size: 15px;
    font-family: inherit;
    transition: var(--pbfh-shop-transition);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
}

.pbfh-checkout-wrapper .form-row input::placeholder,
.pbfh-checkout-wrapper .form-row textarea::placeholder {
    opacity: 0.4;
}

.pbfh-checkout-wrapper .form-row input:focus,
.pbfh-checkout-wrapper .form-row select:focus,
.pbfh-checkout-wrapper .form-row textarea:focus {
    outline: none;
    border-color: var(--pbfh-shop-primary);
    box-shadow: 0 0 0 4px var(--pbfh-shop-primary-light);
}

.pbfh-checkout-wrapper .form-row-half {
    display: inline-block;
    width: calc(50% - 12px);
    vertical-align: top;
}

.pbfh-checkout-wrapper .form-row-half:first-of-type {
    margin-right: 24px;
}

/* Checkout Sidebar */
.pbfh-checkout-sidebar {
    position: sticky;
    top: 32px;
}

/* Order Summary */
.pbfh-checkout-wrapper .order-summary-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pbfh-shop-radius-xl);
    padding: 32px;
    backdrop-filter: blur(20px);
}

.pbfh-checkout-wrapper .order-summary-section h3 {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 18px;
    font-weight: 700;
}

.pbfh-checkout-wrapper .order-items {
    margin-bottom: 24px;
}

.pbfh-checkout-wrapper .order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 16px;
}

.pbfh-checkout-wrapper .order-item:last-child {
    border-bottom: none;
}

.pbfh-checkout-wrapper .item-name {
    font-weight: 600;
}

.pbfh-checkout-wrapper .item-qty {
    font-size: 13px;
    opacity: 0.5;
}

.pbfh-checkout-wrapper .item-total {
    font-weight: 700;
}

/* Order Totals */
.pbfh-checkout-wrapper .order-totals {
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.pbfh-checkout-wrapper .total-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 15px;
}

.pbfh-checkout-wrapper .total-row span:first-child {
    opacity: 0.6;
}

.pbfh-checkout-wrapper .total-row span:last-child {
    font-weight: 600;
}

.pbfh-checkout-wrapper .total-row.grand-total {
    padding-top: 20px;
    margin-top: 12px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 24px;
}

.pbfh-checkout-wrapper .total-row.grand-total span {
    font-weight: 800;
    opacity: 1;
}

/* Payment Section */
.pbfh-checkout-wrapper .payment-section {
    margin: 28px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--pbfh-shop-radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Checkout Button */
.pbfh-checkout-wrapper .checkout-button {
    width: 100%;
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pbfh-shop-success) 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    border-radius: var(--pbfh-shop-radius);
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    box-shadow: 0 4px 20px var(--pbfh-shop-success-glow);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pbfh-checkout-wrapper .checkout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--pbfh-shop-success-glow);
    filter: brightness(1.1);
}

.pbfh-checkout-wrapper .checkout-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Security Badge */
.pbfh-checkout-wrapper .checkout-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.5;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--pbfh-shop-radius);
}

.pbfh-checkout-wrapper .checkout-security .dashicons {
    color: var(--pbfh-shop-success);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pbfh-product-card {
    animation: fadeSlideIn 0.5s ease;
}

/* Loading States */
.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--pbfh-shop-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .pbfh-shop-wrapper,
    .pbfh-cart-wrapper,
    .pbfh-checkout-wrapper {
        padding: 24px 16px;
    }
    
    .pbfh-shop-header h1,
    .pbfh-cart-header h1 {
        font-size: 36px;
    }
    
    .pbfh-empty-state,
    .pbfh-cart-empty,
    .empty-state {
        padding: 60px 24px;
    }
    
    .pbfh-cart-table thead {
        display: none;
    }
    
    .pbfh-cart-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        padding: 20px;
        gap: 12px;
        position: relative;
    }
    
    .pbfh-cart-table td {
        padding: 0;
        border: none;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .button {
        width: 100%;
    }
    
    .pbfh-checkout-wrapper .form-row-half {
        display: block;
        width: 100%;
        margin-right: 0;
    }
    
    .pbfh-checkout-sidebar {
        position: static;
    }
}

/* ==========================================================================
   MINI CART
   ========================================================================== */
.pbfh-mini-cart {
    position: relative;
}

.mini-cart-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pbfh-shop-radius);
    cursor: pointer;
    transition: var(--pbfh-shop-transition);
    font-weight: 600;
    color: inherit;
}

.mini-cart-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--pbfh-shop-primary);
}

.mini-cart-count {
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pbfh-shop-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
}

.mini-cart-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pbfh-shop-radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--pbfh-shop-transition);
    z-index: 1000;
}

.mini-cart-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =========================================
   Add-to-Cart Toast Notification (Shop Grid)
   ========================================= */
#pbfh-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.pbfh-toast {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--pbfh-shop-card-bg, rgba(30, 30, 40, 0.97));
    border: 1px solid var(--pbfh-shop-card-border, rgba(255, 255, 255, 0.12));
    border-radius: var(--pbfh-shop-radius, 14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 320px;
    max-width: 440px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(40px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pbfh-toast.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.pbfh-toast.dismissing {
    opacity: 0;
    transform: translateX(40px) scale(0.96);
    transition: all 0.3s cubic-bezier(0.55, 0, 1, 0.45);
}

.pbfh-toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.pbfh-toast-success .pbfh-toast-icon {
    background: rgba(16, 185, 129, 0.15);
}

.pbfh-toast-icon svg {
    width: 20px;
    height: 20px;
    color: var(--pbfh-shop-success, #10b981);
}

.pbfh-toast-content {
    flex: 1;
    min-width: 0;
}

.pbfh-toast-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pbfh-shop-text, #fff);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.pbfh-toast-message {
    font-size: 13px;
    color: var(--pbfh-shop-text-secondary, rgba(255, 255, 255, 0.6));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pbfh-toast-action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--pbfh-shop-primary, #6366f1);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.pbfh-toast-action:hover {
    background: var(--pbfh-shop-primary-hover, #4f46e5);
    color: #fff;
    transform: translateX(2px);
}

.pbfh-toast-action svg {
    transition: transform 0.2s;
}

.pbfh-toast-action:hover svg {
    transform: translateX(2px);
}

.pbfh-toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--pbfh-shop-text-muted, rgba(255, 255, 255, 0.4));
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    padding: 0;
}

.pbfh-toast-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--pbfh-shop-text, #fff);
}

/* Button success state (grid cards) */
.add-to-cart-btn.added {
    background: var(--pbfh-shop-success, #10b981) !important;
    color: #fff !important;
}

.add-to-cart-btn.added .dashicons {
    animation: pbfh-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pbfh-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Mobile toast adjustments */
@media (max-width: 600px) {
    #pbfh-toast-container {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
    }
    
    .pbfh-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}
