/**
 * PostgreCommerce – Customer-facing Storefront Styles
 *
 * Color palette:
 *   Primary red : #E63946
 *   Accent dark-red   : #991B1B
 *   Text dark      : #333333
 *   Text muted     : #666666
 *   Background     : #f7f6f7
 *   Border         : #e5e5e5
 *
 * @package PostgreCommerce
 */

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-storefront-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pgc-storefront-wrap *,
.pgc-storefront-wrap *::before,
.pgc-storefront-wrap *::after {
    box-sizing: border-box;
}

.pgc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.pgc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

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

@keyframes pgcPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@keyframes pgcSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes pgcSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); }
}

@keyframes pgcSpin {
    to { transform: rotate(360deg); }
}

.pgc-shop-page,
.pgc-product-page,
.pgc-cart-page,
.pgc-checkout-page,
.pgc-order-received-page {
    animation: pgcFadeIn 0.35s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-breadcrumbs {
    margin-bottom: 20px;
    font-size: 13px;
}

.pgc-breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    margin: 0;
}

.pgc-breadcrumbs li {
    display: flex;
    align-items: center;
}

.pgc-breadcrumbs li::after {
    content: ">";
    margin: 0 8px;
    color: #aaa;
    font-size: 11px;
}

.pgc-breadcrumbs li:last-child::after {
    display: none;
}

.pgc-breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.pgc-breadcrumbs a:hover {
    color: #E63946;
}

.pgc-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE TITLES
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #333;
}

.pgc-section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.pgc-btn--add-to-cart {
    background: #991B1B;
    color: #fff;
}

.pgc-btn--add-to-cart:hover {
    background: #7F1D1D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.35);
}

.pgc-btn--add-to-cart:active {
    transform: translateY(0);
}

.pgc-btn--primary {
    background: #E63946;
    color: #fff;
}

.pgc-btn--primary:hover {
    background: #B91C1C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
}

.pgc-btn--secondary {
    background: #f7f6f7;
    color: #333;
    border: 1px solid #ddd;
}

.pgc-btn--secondary:hover {
    background: #eee;
    border-color: #ccc;
}

.pgc-btn--checkout {
    background: #E63946;
    color: #fff;
    font-size: 16px;
    padding: 14px 28px;
}

.pgc-btn--checkout:hover {
    background: #B91C1C;
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.4);
}

.pgc-btn--place-order {
    background: #991B1B;
    color: #fff;
    font-size: 18px;
    padding: 16px 32px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.pgc-btn--place-order:hover {
    background: #7F1D1D;
    box-shadow: 0 6px 20px rgba(153, 27, 27, 0.4);
}

.pgc-btn--place-order:disabled,
.pgc-btn--place-order.pgc-loading {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pgc-btn--disabled {
    background: #eee;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.pgc-btn--block {
    display: flex;
    width: 100%;
}

.pgc-btn--large {
    font-size: 16px;
    padding: 14px 32px;
}

.pgc-btn--small {
    font-size: 13px;
    padding: 7px 14px;
}

.pgc-btn.pgc-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.pgc-btn.pgc-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pgcSpin 0.6s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHOP PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-shop-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

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

.pgc-search-form {
    display: flex;
    position: relative;
}

.pgc-search-input {
    padding: 8px 40px 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 220px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.pgc-search-input:focus {
    border-color: #E63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.pgc-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 6px;
    display: flex;
}

.pgc-search-btn:hover {
    color: #E63946;
}

.pgc-sort-select {
    padding: 8px 32px 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.pgc-sort-select:focus {
    border-color: #E63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.pgc-shop-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
}

.pgc-results-count {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────── */

.pgc-sidebar-toggle {
    display: none;
    width: 100%;
    padding: 10px 16px;
    background: #f7f6f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    color: #333;
}

.pgc-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #333;
}

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

.pgc-category-nav li {
    margin-bottom: 2px;
}

.pgc-category-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.pgc-category-nav a:hover {
    background: #FEE2E2;
    color: #E63946;
}

.pgc-category-nav .pgc-active a {
    background: #E63946;
    color: #fff;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT GRID & CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pgc-related-grid {
    grid-template-columns: repeat(4, 1fr);
}

.pgc-product-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.pgc-product-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.pgc-product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pgc-product-card-link:hover {
    color: inherit;
}

/* ─── Product Image / Placeholder ──────────────────────────────────────── */

.pgc-product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.pgc-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pgc-product-card:hover .pgc-product-image img {
    transform: scale(1.05);
}

.pgc-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgc-placeholder-letter {
    font-size: 56px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    line-height: 1;
}

.pgc-image-large {
    height: 420px;
    border-radius: 10px;
}

.pgc-image-large .pgc-placeholder-letter {
    font-size: 96px;
}

.pgc-image-thumb {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
}

.pgc-image-thumb .pgc-placeholder-letter {
    font-size: 28px;
}

/* ─── Card body ────────────────────────────────────────────────────────── */

.pgc-product-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pgc-product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pgc-category-pill {
    display: inline-block;
    background: #FEE2E2;
    color: #E63946;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pgc-product-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pgc-product-card-footer {
    padding: 0 16px 16px;
}

.pgc-product-card-footer .pgc-btn {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRICES
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.pgc-price--on-sale {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pgc-price-regular {
    color: #999;
    font-size: 15px;
    font-weight: 400;
    text-decoration: line-through;
}

.pgc-price-sale {
    color: #e2401c;
    font-weight: 700;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 4px 0;
}

.pgc-badge--in-stock {
    background: #e7f8db;
    color: #3d7a0c;
}

.pgc-badge--out-of-stock {
    background: #fce4e4;
    color: #c33;
}

.pgc-badge--low-stock {
    background: #fff3cd;
    color: #856404;
}

.pgc-badge--backorder {
    background: #d1ecf1;
    color: #0c5460;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.pgc-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: all 0.15s;
    background: #fff;
}

.pgc-page-link:hover {
    border-color: #E63946;
    color: #E63946;
    background: #FEE2E2;
}

.pgc-page-current {
    background: #E63946;
    border-color: #E63946;
    color: #fff;
    font-weight: 700;
    cursor: default;
}

.pgc-page-prev,
.pgc-page-next {
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE PRODUCT PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.pgc-product-gallery {
    position: sticky;
    top: 32px;
    align-self: start;
}

.pgc-product-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #222;
    line-height: 1.25;
}

.pgc-product-price-wrap {
    margin-bottom: 16px;
}

.pgc-product-price-wrap .pgc-price {
    font-size: 26px;
}

.pgc-product-price-wrap .pgc-price-sale {
    font-size: 26px;
}

.pgc-product-short-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ─── Variant Selector ─────────────────────────────────────────────────── */

.pgc-variant-selector {
    margin: 20px 0;
}

.pgc-variant-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.pgc-variant-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pgc-variant-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    color: #333;
}

.pgc-variant-btn:hover {
    border-color: #E63946;
    color: #E63946;
}

.pgc-variant-active {
    border-color: #E63946;
    background: #E63946;
    color: #fff;
}

.pgc-variant-active:hover {
    background: #B91C1C;
    border-color: #B91C1C;
    color: #fff;
}

.pgc-variant-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ─── Quantity Control ─────────────────────────────────────────────────── */

.pgc-add-to-cart-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.pgc-quantity-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pgc-qty-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.pgc-quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pgc-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 40px;
    border: none;
    background: #f7f6f7;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: background 0.15s;
    font-family: inherit;
    line-height: 1;
}

.pgc-qty-btn:hover {
    background: #e5e5e5;
    color: #333;
}

.pgc-qty-input {
    width: 54px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
    font-family: inherit;
    color: #333;
}

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

/* ─── Product Meta ─────────────────────────────────────────────────────── */

.pgc-product-meta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pgc-meta-row {
    font-size: 14px;
    margin-bottom: 6px;
    display: flex;
    gap: 8px;
}

.pgc-meta-label {
    color: #888;
    font-weight: 500;
}

.pgc-meta-value {
    color: #333;
}

.pgc-meta-value a {
    color: #E63946;
    text-decoration: none;
}

.pgc-meta-value a:hover {
    text-decoration: underline;
}

/* ─── Full Description ─────────────────────────────────────────────────── */

.pgc-product-description {
    border-top: 1px solid #eee;
    padding-top: 32px;
    margin-bottom: 48px;
}

.pgc-product-description h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
}

.pgc-description-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    max-width: 800px;
}

.pgc-description-content p {
    margin: 0 0 14px;
}

/* ─── Related Products ─────────────────────────────────────────────────── */

.pgc-related-products {
    border-top: 1px solid #eee;
    padding-top: 32px;
}

.pgc-related-products h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CART PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

.pgc-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pgc-cart-table thead th {
    text-align: left;
    padding: 12px 10px;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

.pgc-cart-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.pgc-cart-table tbody tr:hover {
    background: #fafafa;
}

.pgc-cart-td-image,
.pgc-cart-td-name,
.pgc-cart-td-price,
.pgc-cart-td-qty,
.pgc-cart-td-total,
.pgc-cart-td-remove {
    padding: 16px 10px;
    vertical-align: middle;
}

.pgc-cart-td-image {
    width: 80px;
    padding-right: 0;
}

.pgc-cart-product-name {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: block;
}

.pgc-cart-product-name:hover {
    color: #E63946;
}

.pgc-cart-variant {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.pgc-cart-td-qty .pgc-quantity-control {
    transform: scale(0.9);
    transform-origin: left center;
}

.pgc-cart-line-total {
    font-weight: 600;
    color: #333;
}

.pgc-cart-remove {
    background: none;
    border: none;
    font-size: 22px;
    color: #ccc;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1;
}

.pgc-cart-remove:hover {
    color: #e2401c;
    background: #fce4e4;
}

.pgc-cart-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ─── Cart Summary ─────────────────────────────────────────────────────── */

.pgc-cart-summary {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px;
    position: sticky;
    top: 32px;
}

.pgc-cart-summary-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.pgc-totals-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.pgc-totals-table th,
.pgc-totals-table td {
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.pgc-totals-table th {
    text-align: left;
    font-weight: 500;
    color: #555;
}

.pgc-totals-table td {
    text-align: right;
    color: #333;
}

.pgc-totals-total th,
.pgc-totals-total td {
    font-size: 18px;
    font-weight: 700;
    border-bottom: none;
    padding-top: 14px;
    color: #222;
}

.pgc-cart-coupon {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.pgc-coupon-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.pgc-coupon-input:focus {
    border-color: #E63946;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKOUT PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

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

.pgc-checkout-section {
    margin-bottom: 32px;
}

/* ─── Form Fields ──────────────────────────────────────────────────────── */

.pgc-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pgc-form-group {
    margin-bottom: 16px;
}

.pgc-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
}

.pgc-form-group label abbr {
    color: #e2401c;
    text-decoration: none;
    border: none;
}

.pgc-optional {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}

.pgc-form-group input[type="text"],
.pgc-form-group input[type="email"],
.pgc-form-group input[type="tel"],
.pgc-form-group input[type="number"],
.pgc-form-group select,
.pgc-form-group textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    color: #333;
}

.pgc-form-group input:focus,
.pgc-form-group select:focus,
.pgc-form-group textarea:focus {
    border-color: #E63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.pgc-form-group input.pgc-field-error,
.pgc-form-group select.pgc-field-error {
    border-color: #e2401c;
    box-shadow: 0 0 0 3px rgba(226, 64, 28, 0.1);
}

.pgc-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.pgc-checkbox-group {
    margin-bottom: 8px;
}

.pgc-checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.pgc-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #E63946;
}

/* ─── Order Review Sidebar ─────────────────────────────────────────────── */

.pgc-order-review {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 28px;
    position: sticky;
    top: 32px;
}

.pgc-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.pgc-order-table th,
.pgc-order-table td {
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.pgc-order-table thead th {
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pgc-order-table tbody td {
    color: #444;
    font-size: 13px;
}

.pgc-order-table tbody td small {
    color: #888;
}

.pgc-order-table tfoot th {
    text-align: left;
    font-weight: 500;
    color: #555;
}

.pgc-order-table tfoot td {
    color: #333;
}

.pgc-text-right {
    text-align: right !important;
}

.pgc-order-total-row th,
.pgc-order-total-row td {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #222 !important;
    padding-top: 14px;
    border-bottom: none;
}

/* ─── Payment Methods ──────────────────────────────────────────────────── */

.pgc-payment-methods {
    margin: 20px 0;
}

.pgc-payment-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #333;
}

.pgc-payment-option {
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
    transition: border-color 0.15s;
}

.pgc-payment-option:has(input:checked) {
    border-color: #E63946;
    background: #FEE2E2;
}

.pgc-payment-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.pgc-payment-option input[type="radio"] {
    accent-color: #E63946;
    width: 16px;
    height: 16px;
}

.pgc-payment-label {
    font-weight: 600;
    color: #333;
}

.pgc-payment-desc {
    font-size: 12px;
    color: #888;
    margin: 6px 0 0 26px;
    line-height: 1.5;
}

.pgc-stripe-cards {
    display: flex;
    gap: 8px;
    margin: 8px 0 0 26px;
}

.pgc-card-icon {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.3px;
}

.pgc-payment-secure {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00b894;
    font-size: 12px;
    margin: 8px 0 0 26px;
    font-weight: 500;
}

/* ─── Premium Card Brand Logos ──────────────────────────────────────── */
.pgc-stripe-brands {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0 26px;
    flex-wrap: wrap;
}

.pgc-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 30px;
    border-radius: 5px;
    border: 1px solid #e5e5e5;
    background: #fff;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pgc-brand-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.pgc-brand-logo svg {
    width: 40px;
    height: 24px;
}

.pgc-brand-amex { border-color: #016FD0; }
.pgc-brand-applepay { border-color: #333; background: #000; }

/* ─── Trust Badges Strip ──────────────────────────────────────────── */
.pgc-trust-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0 26px;
    flex-wrap: wrap;
}

.pgc-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.pgc-trust-badge svg {
    flex-shrink: 0;
}

.pgc-trust-ssl {
    background: #d4edda;
    color: #155724;
}
.pgc-trust-ssl svg { color: #28a745; }

.pgc-trust-stripe {
    background: #ede7f6;
    color: #635bff;
}
.pgc-trust-stripe svg { color: #635bff; }

.pgc-trust-pci {
    background: #d1ecf1;
    color: #0c5460;
}
.pgc-trust-pci svg { color: #17a2b8; }

.pgc-guarantee-note {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 8px 0 0 26px;
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

.pgc-guarantee-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #aaa;
}

.pgc-payment-test-mode {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e17055;
    font-size: 12px;
    margin: 10px 0 0 26px;
    font-weight: 600;
    background: #FFF3E0;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #FFCC80;
}

.pgc-payment-test-mode svg {
    flex-shrink: 0;
}


/* ─── Terms & Place Order ──────────────────────────────────────────────── */

.pgc-checkout-terms {
    margin: 16px 0 20px;
}

.pgc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}

.pgc-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #E63946;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pgc-checkbox-label a {
    color: #E63946;
    text-decoration: none;
}

.pgc-checkbox-label a:hover {
    text-decoration: underline;
}

.pgc-checkout-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fce4e4;
    color: #c33;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORDER RECEIVED / THANK YOU
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-order-success {
    text-align: center;
    padding: 32px 0;
}

.pgc-success-icon {
    margin-bottom: 16px;
}

.pgc-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.pgc-order-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 32px;
}

.pgc-overview-item {
    text-align: center;
}

.pgc-overview-label {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pgc-overview-value {
    font-size: 16px;
    color: #333;
}

.pgc-order-details {
    margin-bottom: 32px;
}

.pgc-order-details h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}

.pgc-order-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.pgc-address-col h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.pgc-address {
    font-style: normal;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

.pgc-order-received-actions {
    text-align: center;
    padding-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.pgc-empty-icon {
    margin-bottom: 20px;
    opacity: 0.6;
}

.pgc-empty-state h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #555;
}

.pgc-empty-state p {
    font-size: 15px;
    color: #888;
    margin: 0 0 24px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.pgc-toast {
    pointer-events: auto;
    padding: 14px 20px;
    background: #333;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    animation: pgcSlideIn 0.35s ease-out;
    max-width: 380px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgc-toast--success {
    background: #2f8e3d;
}

.pgc-toast--error {
    background: #c33;
}

.pgc-toast--removing {
    animation: pgcSlideOut 0.3s ease-in forwards;
}

.pgc-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CART COUNT BADGE (header)
   ═══════════════════════════════════════════════════════════════════════════ */

.pgc-header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pgc-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #E63946;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1;
}

.pgc-cart-count.pgc-pulse {
    animation: pgcPulse 0.35s ease-in-out;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (< 1024px)
   ═══════════════════════════════════════════════════════════════════════════ */

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

    .pgc-sidebar-toggle {
        display: flex;
    }

    .pgc-category-list {
        display: none;
    }

    .pgc-category-list.pgc-sidebar-open {
        display: block;
        margin-top: 8px;
    }

    .pgc-sidebar-title {
        display: none;
    }

    .pgc-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pgc-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pgc-product-layout {
        gap: 28px;
    }

    .pgc-checkout-layout {
        grid-template-columns: 1fr 380px;
        gap: 28px;
    }

    .pgc-cart-layout {
        grid-template-columns: 1fr 320px;
        gap: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet Small (< 768px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .pgc-container {
        padding: 16px 16px 48px;
    }

    .pgc-page-title {
        font-size: 24px;
    }

    .pgc-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .pgc-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pgc-product-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .pgc-product-gallery {
        position: static;
    }

    .pgc-image-large {
        height: 300px;
    }

    .pgc-product-title {
        font-size: 24px;
    }

    .pgc-checkout-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .pgc-cart-layout {
        grid-template-columns: 1fr;
    }

    .pgc-cart-summary {
        position: static;
    }

    .pgc-order-review {
        position: static;
    }

    .pgc-order-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .pgc-order-addresses {
        grid-template-columns: 1fr;
    }

    .pgc-shop-header {
        flex-direction: column;
    }

    .pgc-shop-controls {
        width: 100%;
    }

    .pgc-search-input {
        flex: 1;
        width: auto;
    }

    .pgc-search-form {
        flex: 1;
    }

    /* Responsive cart table */
    .pgc-cart-table thead {
        display: none;
    }

    .pgc-cart-table,
    .pgc-cart-table tbody,
    .pgc-cart-table tr,
    .pgc-cart-table td {
        display: block;
    }

    .pgc-cart-table tr {
        padding: 16px 0;
        border-bottom: 1px solid #eee;
        position: relative;
    }

    .pgc-cart-td-image {
        display: inline-block;
        width: auto;
        padding: 0 16px 8px 0;
        vertical-align: top;
    }

    .pgc-cart-td-name {
        display: inline-block;
        padding: 0 0 8px;
        vertical-align: top;
    }

    .pgc-cart-td-price,
    .pgc-cart-td-qty,
    .pgc-cart-td-total {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
    }

    .pgc-cart-td-price::before,
    .pgc-cart-td-qty::before,
    .pgc-cart-td-total::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
    }

    .pgc-cart-td-remove {
        position: absolute;
        top: 16px;
        right: 0;
        padding: 0;
    }

    .pgc-cart-td-qty .pgc-quantity-control {
        transform: scale(0.85);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (< 480px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .pgc-container {
        padding: 12px 12px 36px;
    }

    .pgc-page-title {
        font-size: 20px;
    }

    .pgc-product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pgc-related-grid {
        grid-template-columns: 1fr;
    }

    .pgc-product-image {
        height: 180px;
    }

    .pgc-image-large {
        height: 240px;
    }

    .pgc-product-title {
        font-size: 20px;
    }

    .pgc-add-to-cart-form {
        flex-direction: column;
        align-items: stretch;
    }

    .pgc-form-row--half {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .pgc-order-overview {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px;
    }

    .pgc-variant-buttons {
        gap: 6px;
    }

    .pgc-variant-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .pgc-pagination {
        gap: 4px;
    }

    .pgc-page-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .pgc-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .pgc-toast {
        max-width: none;
    }

    .pgc-btn--place-order {
        font-size: 16px;
        padding: 14px 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
    .pgc-btn,
    .pgc-search-form,
    .pgc-sort-wrap,
    .pgc-sidebar-toggle,
    .pgc-cart-remove,
    .pgc-quantity-control .pgc-qty-btn,
    .pgc-pagination,
    .pgc-cart-actions,
    .pgc-cart-coupon,
    .pgc-toast-container {
        display: none !important;
    }

    .pgc-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .pgc-container {
        max-width: none;
        padding: 0;
    }
}

/* ==========================================================================
   SVOD rebrand — Product gallery thumbnails + specs table
   ========================================================================== */

.pgc-product-gallery .pgc-gallery-main {
    margin-bottom: 12px;
}

.pgc-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.pgc-gallery-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f6f7;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.pgc-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pgc-gallery-thumb:hover {
    border-color: #E63946;
    transform: translateY(-1px);
}

.pgc-gallery-thumb--active {
    border-color: #E63946;
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.15);
}

.pgc-product-specs {
    margin: 20px 0;
    padding: 16px;
    background: #FEE2E2;
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 8px;
}

.pgc-specs-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #991B1B;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pgc-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pgc-specs-table th,
.pgc-specs-table td {
    padding: 8px 4px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(230, 57, 70, 0.1);
}

.pgc-specs-table tr:last-child th,
.pgc-specs-table tr:last-child td {
    border-bottom: none;
}

.pgc-specs-table th {
    width: 35%;
    font-weight: 600;
    color: #0A0A0A;
    white-space: nowrap;
}

.pgc-specs-table td {
    color: #333;
    line-height: 1.5;
}



/* ==========================================================================
   Cart counter bubble + Star Shower effect
   ========================================================================== */

/* Pulse on cart count badge when it changes */
.pgc-cart-count.pgc-pulse,
.cart-count.pgc-pulse {
    animation: pgcCountPulse 0.6s ease-out;
}

@keyframes pgcCountPulse {
    0%   { transform: scale(1);   background: #E63946; }
    30%  { transform: scale(1.6); background: #F87171; }
    60%  { transform: scale(0.95); }
    100% { transform: scale(1);   background: #E63946; }
}

/* Cart icon parent bump */
.header-action-btn.pgc-cart-bump {
    animation: pgcCartBump 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pgcCartBump {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.25) rotate(-6deg); }
    50%  { transform: scale(1.15) rotate(4deg); }
    75%  { transform: scale(1.05) rotate(-2deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Star shower particles */
.pgc-star-layer {
    pointer-events: none !important;
}

.pgc-star {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translate(-50%, -50%);
    text-shadow:
        0 0 4px currentColor,
        0 0 12px rgba(230, 57, 70, 0.6);
    animation-name: pgcStarFly;
    animation-timing-function: cubic-bezier(0.55, 0, 0.4, 1);
    animation-fill-mode: forwards;
    animation-iteration-count: 1;
    z-index: 99999;
}

@keyframes pgcStarFly {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.4) rotate(45deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform:
            translate(calc(-50% + var(--pgc-star-dx, 0px)), calc(-50% + var(--pgc-star-dy, 0px)))
            scale(0.4)
            rotate(720deg);
        opacity: 0;
    }
}

/* Make cart count badge look like a proper badge if theme's inline display:none is removed */
.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background: #E63946;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    position: absolute;
    top: -4px;
    right: -4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.header-action-btn {
    position: relative;
}
