/**
 * PhpCart Frontend Stylesheet — themed for MaxBrightPro.in
 * Dark charcoal + yellow design system, scoped inside .phpcart-wrapper
 * so it never conflicts with the host site.
 */

:root,
.phpcart-wrapper,
.phpcart-modal-backdrop,
.phpcart-modal-dialog {
    --phpcart-primary: #ffd100;
    --phpcart-primary-hover: #ffdf3d;
    --phpcart-accent: #ffd100;
    --phpcart-accent-hover: #ffdf3d;
    --phpcart-text: #f5f6f8;
    --phpcart-muted: #9aa0aa;
    --phpcart-bg: #0b0b0e;
    --phpcart-card-bg: #141419;
    --phpcart-border: #2a2a32;
    --phpcart-radius: 12px;
    --phpcart-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --phpcart-display-font: 'Saira Condensed', 'Arial Narrow', sans-serif;
    --phpcart-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

    font-family: var(--phpcart-font);
    color: var(--phpcart-text);
    box-sizing: border-box;
    line-height: 1.5;
}

.phpcart-wrapper *,
.phpcart-wrapper *::before,
.phpcart-wrapper *::after {
    box-sizing: inherit;
}

/* Product Grid */
.phpcart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.phpcart-card {
    background: var(--phpcart-card-bg);
    border: 1px solid var(--phpcart-border);
    border-radius: var(--phpcart-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--phpcart-shadow);
}

.phpcart-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 209, 0, 0.45);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.phpcart-card-img-wrap {
    height: 240px;
    background: #1b1b22;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
    overflow: hidden;
}

.phpcart-card-img-wrap a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.phpcart-card-img {
    max-height: 200px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.phpcart-card:hover .phpcart-card-img {
    transform: scale(1.04);
}

.phpcart-badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--phpcart-accent);
    color: #0b0b0e;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    z-index: 2;
}

.phpcart-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.phpcart-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--phpcart-text);
    text-decoration: none;
    line-height: 1.3;
}

.phpcart-card-title:hover {
    color: var(--phpcart-accent);
}

.phpcart-card-desc {
    font-size: 13px;
    color: var(--phpcart-muted);
    margin-bottom: 12px;
    flex: 1;
}

.phpcart-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.phpcart-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--phpcart-accent);
}

.phpcart-regular-price {
    font-size: 13px;
    text-decoration: line-through;
    color: var(--phpcart-muted);
}

.phpcart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    background: var(--phpcart-accent);
    color: #0b0b0e;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    width: 100%;
    letter-spacing: 0.03em;
}

.phpcart-btn:hover {
    background: var(--phpcart-accent-hover);
    transform: translateY(-1px);
}

.phpcart-btn-secondary {
    background: #1e1e26;
    color: var(--phpcart-text);
    border: 1px solid var(--phpcart-border);
}
.phpcart-btn-secondary:hover {
    background: #26262f;
}

/* Product Single Layout */
.phpcart-single-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 30px 0;
}

.phpcart-gallery-main {
    background: #1b1b22;
    border: 1px solid var(--phpcart-border);
    border-radius: var(--phpcart-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 420px;
}

.phpcart-gallery-main img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.phpcart-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.phpcart-thumb-item {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    object-fit: contain;
    background: #1b1b22;
    padding: 4px;
}

.phpcart-thumb-item.active {
    border-color: var(--phpcart-accent);
}

.phpcart-single-title {
    font-family: var(--phpcart-display-font);
    font-size: 30px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.2;
}

.phpcart-single-sku {
    font-size: 12px;
    color: var(--phpcart-muted);
    margin-bottom: 16px;
}

.phpcart-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--phpcart-border);
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e26;
}

.phpcart-qty-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: var(--phpcart-text);
}

.phpcart-qty-btn:hover {
    background: #2a2a32;
    color: var(--phpcart-accent);
}

.phpcart-qty-input {
    width: 48px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--phpcart-text);
    background: transparent;
}

/* Cart Page Layout & Cards */
.phpcart-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, 1fr);
    gap: 30px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.phpcart-cart-items-card {
    background: var(--phpcart-card-bg, #141419);
    border: 1px solid var(--phpcart-border, #2a2a32);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.phpcart-order-summary-wrapper {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.phpcart-order-summary-card {
    background: var(--phpcart-card-bg, #141419);
    border: 1.5px solid rgba(255, 209, 0, 0.25);
    border-radius: 18px;
    padding: 26px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 90px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.phpcart-cart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--phpcart-border, #2a2a32);
    gap: 12px;
    min-width: 0;
}

.phpcart-cart-card-header h3 {
    font-family: var(--phpcart-display-font, 'Saira Condensed', sans-serif);
    font-size: 24px;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
    min-width: 0;
}

.phpcart-cart-card-header a {
    font-size: 13.5px;
    color: #ffd100;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.phpcart-cart-card-header a:hover {
    text-decoration: underline;
}

.phpcart-cart-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.phpcart-cart-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 8px 0 20px;
}

.phpcart-cart-table th {
    background: transparent;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--phpcart-muted);
    border-bottom: 1px solid var(--phpcart-border);
}

.phpcart-cart-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #1e1e26;
    vertical-align: middle;
    color: var(--phpcart-text);
}

.phpcart-col-product {
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.phpcart-col-product img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #1b1b22;
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--phpcart-border, #2a2a32);
    flex-shrink: 0;
}

.phpcart-col-product-info {
    min-width: 0;
    flex: 1 1 auto;
}

.phpcart-col-product-info strong {
    display: block;
    font-size: 15px;
    word-break: break-word;
}

.phpcart-col-product-info a {
    color: #f5f6f8;
    text-decoration: none;
}

.phpcart-col-product-info a:hover {
    color: #ffd100;
}

.phpcart-variant-tag {
    font-size: 12px;
    color: #ffd100;
    font-weight: 600;
    margin-top: 2px;
}

.phpcart-col-price {
    padding: 16px 10px;
    font-weight: 600;
    color: #f5f6f8;
    font-size: 15px;
    white-space: nowrap;
}

.phpcart-col-qty {
    padding: 16px 10px;
}

.phpcart-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--phpcart-border, #2a2a32);
    border-radius: 999px;
    overflow: hidden;
    background: #1e1e26;
    flex-shrink: 0;
}

.phpcart-qty-btn {
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    color: #f5f6f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.phpcart-qty-btn:hover {
    background: rgba(255, 209, 0, 0.15);
    color: #ffd100;
}

.phpcart-qty-input {
    width: 36px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 13.5px;
    color: #f5f6f8;
    padding: 0;
}

.phpcart-col-subtotal {
    padding: 16px 10px;
    text-align: right;
    font-weight: 700;
    color: #f5f6f8;
    font-size: 16px;
    white-space: nowrap;
}

.phpcart-col-remove {
    padding: 16px 0 16px 12px;
    text-align: right;
}

.phpcart-cart-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.phpcart-cart-remove-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    transform: scale(1.05);
}

.phpcart-coupon-box {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    max-width: 420px;
    align-items: center;
    min-width: 0;
    width: 100%;
}

.phpcart-coupon-box input {
    text-transform: uppercase;
    margin: 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    min-width: 0;
    flex: 1;
}

.phpcart-coupon-box button {
    width: auto;
    white-space: nowrap;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

.phpcart-coupon-applied-msg {
    font-size: 13px;
    color: #ffd100;
    margin-top: 8px;
    font-weight: 600;
}

.phpcart-coupon-applied-msg a {
    color: #f87171;
    margin-left: 8px;
    text-decoration: underline;
    font-size: 12px;
}

/* Order Summary Card Styles */
.phpcart-summary-title {
    font-family: var(--phpcart-display-font, 'Saira Condensed', sans-serif);
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 18px;
    border-bottom: 1px solid var(--phpcart-border, #2a2a32);
    padding-bottom: 12px;
}

.phpcart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14.5px;
    min-width: 0;
    max-width: 100%;
}

.phpcart-summary-label {
    color: var(--phpcart-muted, #9aa0aa);
    min-width: 0;
    word-break: break-word;
    flex: 1 1 auto;
}

.phpcart-summary-val {
    color: #f5f6f8;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
    font-weight: 600;
}

.phpcart-summary-row--discount .phpcart-summary-label,
.phpcart-summary-row--discount .phpcart-summary-val {
    color: #ffd100;
}

.phpcart-summary-note {
    margin: -4px 0 12px;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--phpcart-muted, #9aa0aa);
}

.phpcart-summary-row--total {
    border-top: 2px solid rgba(255, 209, 0, 0.3);
    padding-top: 16px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.phpcart-summary-total-label {
    font-size: 16px;
    font-weight: 700;
    color: #f5f6f8;
}

.phpcart-summary-total-price {
    font-family: var(--phpcart-display-font, 'Saira Condensed', sans-serif);
    font-size: 26px;
    font-weight: 700;
    color: #ffd100;
    white-space: nowrap;
}

.phpcart-delivery-pin-box {
    margin-top: 18px;
    padding: 14px 16px;
    background: #1a1a22;
    border: 1.5px solid var(--phpcart-border, #2a2a32);
    border-radius: 12px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.phpcart-pin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.phpcart-pin-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.phpcart-pin-status {
    font-size: 11px;
    color: #ffd100;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.phpcart-pin-inputs {
    display: flex;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.phpcart-pin-inputs input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 12px;
    background: #0e0e12;
    border: 1.5px solid #2a2a32;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}

.phpcart-pin-inputs input:focus {
    border-color: #ffd100;
}

.phpcart-pin-inputs button {
    width: auto;
    padding: 9px 14px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.phpcart-trust-points {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--phpcart-border, #2a2a32);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--phpcart-muted, #9aa0aa);
}

.phpcart-trust-point {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Checkout 3-Step Stepper */
.phpcart-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.phpcart-step {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--phpcart-muted);
    position: relative;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--phpcart-border);
}

.phpcart-step.active {
    color: var(--phpcart-accent);
    border-bottom-color: var(--phpcart-accent);
}

/* Form inputs */
.phpcart-input, .phpcart-select, .phpcart-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #34343e;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #f5f6f8 !important;
    background: #101014 !important;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phpcart-input::placeholder, .phpcart-textarea::placeholder {
    color: #8b93a1 !important;
    opacity: 1;
}

.phpcart-input:focus, .phpcart-select:focus, .phpcart-textarea:focus {
    outline: none;
    border-color: #ffd100 !important;
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15) !important;
}

.phpcart-select option {
    background: #141419;
    color: #f5f6f8;
}

.phpcart-modal-dialog label,
.phpcart-wrapper label {
    color: #cfd4dc !important;
    font-weight: 600;
}

/* Header Cart Icon Badge */
.phpcart-cart-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.phpcart-cart-badge {
    background: var(--phpcart-accent);
    color: #0b0b0e;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
    .phpcart-single-wrap {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .phpcart-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .phpcart-card-img-wrap {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .phpcart-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Mobile Auth Modal & DPDT Act 2023 UI Elements — MaxBrightPro theme
   ========================================================================== */

.phpcart-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    animation: phpcartFadeIn 0.2s ease-out;
}

@keyframes phpcartFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.phpcart-modal-dialog {
    background: #141419;
    border-radius: 14px;
    width: 100%;
    max-width: 740px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 209, 0, 0.28);
}

.phpcart-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    z-index: 20;
    transition: all 0.15s ease;
}

.phpcart-modal-close:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.85);
    border-color: #ef4444;
}

.phpcart-auth-container {
    display: grid;
    grid-template-columns: 2fr 3fr;
    min-height: 440px;
}

/* Left Brand Banner */
.phpcart-auth-banner {
    background: linear-gradient(160deg, #141419 0%, #0b0b0e 100%);
    color: #ffffff;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border-right: 1px solid rgba(255, 209, 0, 0.18);
}

.phpcart-auth-banner::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 209, 0, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.phpcart-auth-logo {
    height: 44px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.phpcart-auth-banner h2 {
    font-family: var(--phpcart-display-font);
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--phpcart-accent);
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.phpcart-auth-banner p {
    font-size: 13px;
    color: #b9bfca;
    line-height: 1.5;
    margin: 0 0 24px;
}

.phpcart-auth-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.phpcart-auth-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #9aa0aa;
}

.phpcart-badge-icon {
    color: var(--phpcart-accent);
    display: inline-flex;
}

/* Right Form Panel */
.phpcart-auth-form-wrap {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #141419;
}

.phpcart-auth-heading {
    font-family: var(--phpcart-display-font);
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 6px;
}

.phpcart-auth-subtext {
    font-size: 13px;
    color: var(--phpcart-muted);
    margin: 0 0 20px;
}

.phpcart-auth-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-left: 3px solid #ef4444;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-weight: 500;
}

/* Phone Input Group */
.phpcart-phone-input-group {
    display: flex;
    border: 1.5px solid #34343e;
    border-radius: 8px;
    overflow: hidden;
    background: #101014;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phpcart-phone-input-group:focus-within {
    border-color: #ffd100;
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.14);
}

.phpcart-phone-prefix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #1a1a21;
    border-right: 1px solid #34343e;
    font-size: 14px;
    font-weight: 600;
    color: #cfd4dc;
    user-select: none;
}

.phpcart-in-flag {
    font-size: 16px;
}

.phpcart-phone-input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #f5f6f8;
    outline: none;
    background: transparent;
    font-family: inherit;
}

.phpcart-phone-input::placeholder {
    font-weight: 400;
    color: #6b7280;
    letter-spacing: 0;
    font-size: 14px;
}

/* DPDT Consent Box */
.phpcart-dpdt-consent-box {
    margin: 16px 0;
    padding: 10px 12px;
    background: rgba(255, 209, 0, 0.06);
    border: 1px solid rgba(255, 209, 0, 0.25);
    border-radius: 6px;
    font-size: 11.5px;
    line-height: 1.45;
    color: #d9de07;
    color: #e6e05a;
}

.phpcart-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.phpcart-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #ffd100;
    cursor: pointer;
}

.phpcart-link {
    color: var(--phpcart-accent);
    font-weight: 600;
    text-decoration: underline;
}

.phpcart-link:hover {
    color: var(--phpcart-accent-hover);
}

/* Yellow Action Button (alias of .phpcart-btn-gold kept for compat) */
.phpcart-btn-gold {
    background: var(--phpcart-accent) !important;
    color: #0b0b0e !important;
    font-weight: 800 !important;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 14px rgba(255, 209, 0, 0.22);
    transition: transform 0.15s, box-shadow 0.15s;
}

.phpcart-btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 209, 0, 0.32);
}

/* 6-box OTP Stepper */
.phpcart-otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin: 18px 0;
}

.phpcart-otp-box {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 1.5px solid #34343e;
    border-radius: 8px;
    outline: none;
    color: #f5f6f8;
    background: #101014;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
}

.phpcart-otp-box:focus {
    border-color: #ffd100;
    background: #17171d;
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15);
}

.phpcart-otp-timer-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--phpcart-muted);
    margin-bottom: 20px;
}

.phpcart-change-phone-btn {
    background: none;
    border: none;
    color: var(--phpcart-accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
    text-decoration: underline;
}

.phpcart-test-mode-notice {
    margin-top: 14px;
    font-size: 11.5px;
    background: rgba(255, 209, 0, 0.07);
    border: 1px dashed rgba(255, 209, 0, 0.5);
    color: #f0e17e;
    padding: 8px 10px;
    border-radius: 6px;
}

.phpcart-auth-switch {
    margin-top: 16px;
    text-align: center;
}

.phpcart-text-btn {
    background: none;
    border: none;
    color: var(--phpcart-muted);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
}

.phpcart-text-btn:hover {
    color: var(--phpcart-accent);
}

/* Legacy utility kept for widget markup */
.btn-gold-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--phpcart-accent);
    color: #0b0b0e;
    border: none;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-gold-solid:hover {
    background: var(--phpcart-accent-hover);
    transform: translateY(-1px);
}

/* ============================================================
   Print — receipts only
   The widget surfaces are dark-themed; flatten them to ink-friendly
   black-on-white and drop anything marked .phpcart-print-hide.
   ============================================================ */
@media print {
    .phpcart-wrapper {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .phpcart-wrapper,
    .phpcart-wrapper * {
        background: transparent !important;
        background-image: none !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        position: static !important;
    }

    .phpcart-print-hide,
    .phpcart-auth-overlay,
    .phpcart-toast {
        display: none !important;
    }

    .phpcart-wrapper table { border-collapse: collapse !important; }
    .phpcart-wrapper table,
    .phpcart-wrapper th,
    .phpcart-wrapper td {
        border-color: #ccc !important;
    }

    #phpcart-print-receipt {
        background: #fff !important;
        border: 1px solid #bbb !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #phpcart-print-receipt img { max-height: 90px !important; }
    #phpcart-print-receipt tr,
    #phpcart-print-receipt .phpcart-print-keep { page-break-inside: avoid; }
}

/* Modal Responsive */
@media (max-width: 640px) {
    .phpcart-modal-backdrop {
        padding: 10px;
        align-items: center;
    }
    .phpcart-modal-dialog {
        max-height: calc(100vh - 20px);
        border-radius: 12px;
        margin: auto;
    }
    .phpcart-auth-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .phpcart-auth-banner {
        padding: 18px 16px 14px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 209, 0, 0.18);
        text-align: center;
    }
    .phpcart-auth-banner-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .phpcart-auth-logo {
        height: 34px !important;
        width: auto !important;
        max-width: 140px;
        margin: 0 auto 8px !important;
        display: block;
    }
    .phpcart-auth-banner h2 {
        font-size: 20px !important;
        margin: 0 0 2px !important;
        text-align: center;
    }
    .phpcart-auth-banner p,
    .phpcart-auth-badges {
        display: none !important;
    }
    .phpcart-auth-form-wrap {
        padding: 18px 16px 22px;
    }
    .phpcart-auth-heading {
        font-size: 18px;
        text-align: center;
        margin-bottom: 4px;
    }
    .phpcart-auth-subtext {
        text-align: center;
        font-size: 12px;
        margin-bottom: 16px;
    }
    .phpcart-phone-input-group {
        border-radius: 8px;
    }
    .phpcart-phone-prefix {
        padding: 10px 12px;
        font-size: 14px;
    }
    .phpcart-phone-input {
        padding: 12px;
        font-size: 16px;
    }
    .phpcart-otp-box {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
}

/* ==========================================================================
   Responsive Cart & Checkout Layouts — Tablet, Mobile & Zoom Safeguards
   ========================================================================== */

/* Tablet & Zoomed Viewports (<= 1024px) */
@media (max-width: 1024px) {
    .phpcart-cart-layout,
    .phpcart-checkout-layout {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .phpcart-order-summary-card {
        position: static !important;
        top: auto !important;
        max-width: 100% !important;
    }

    .phpcart-checkout-layout > div:last-child > div {
        position: static !important;
    }
}

/* Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
    .phpcart-cart-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .phpcart-cart-items-card {
        padding: 18px 16px !important;
        border-radius: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .phpcart-order-summary-card {
        position: static !important;
        padding: 20px 16px !important;
        border-radius: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .phpcart-cart-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .phpcart-cart-table,
    .phpcart-cart-table tbody {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .phpcart-cart-table thead {
        display: none !important;
    }

    .phpcart-cart-row {
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 12px 14px !important;
        padding: 16px 0 !important;
        border-bottom: 1px solid var(--phpcart-border, #2a2a32) !important;
        position: relative !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Product thumbnail + Title */
    .phpcart-col-product {
        grid-column: 1 / 3 !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 0 36px 0 0 !important; /* Space for remove button */
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .phpcart-col-product img {
        width: 52px !important;
        height: 52px !important;
        flex-shrink: 0 !important;
    }

    .phpcart-col-product-info {
        min-width: 0 !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
    }

    .phpcart-col-product-info strong {
        display: block !important;
        font-size: 14.5px !important;
        line-height: 1.35 !important;
        word-break: break-word !important;
    }

    /* Hide redundant unit price cell on mobile, line total is clearly shown */
    .phpcart-col-price {
        display: none !important;
    }

    /* Quantity Stepper */
    .phpcart-col-qty {
        grid-column: 1 / 2 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        min-width: 0 !important;
    }

    .phpcart-qty-stepper {
        border-width: 1px !important;
    }

    .phpcart-qty-btn {
        width: 28px !important;
        height: 28px !important;
    }

    .phpcart-qty-input {
        width: 32px !important;
        font-size: 13px !important;
    }

    /* Line total / Subtotal */
    .phpcart-col-subtotal {
        grid-column: 2 / 3 !important;
        display: block !important;
        text-align: right !important;
        padding: 0 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #ffd100 !important;
        white-space: nowrap !important;
    }

    /* Remove 'x' button */
    .phpcart-col-remove {
        display: block !important;
        position: absolute !important;
        top: 14px !important;
        right: 0 !important;
        padding: 0 !important;
        z-index: 2 !important;
    }

    .phpcart-coupon-box {
        max-width: 100% !important;
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-top: 18px !important;
    }

    .phpcart-coupon-box input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 13px !important;
        padding: 10px 12px !important;
    }

    .phpcart-coupon-box button {
        width: 100% !important;
        padding: 10px !important;
    }

    .phpcart-delivery-pin-box {
        padding: 12px 14px !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    .phpcart-delivery-pin-box input {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 12.5px !important;
    }

    /* Checkout Layout */
    .phpcart-checkout-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .phpcart-checkout-layout > div:last-child > div {
        position: static !important;
    }
}

/* Small Mobile Screens & Extreme Zoom (<= 480px) */
@media (max-width: 480px) {
    .phpcart-cart-items-card {
        padding: 16px 12px !important;
        border-radius: 14px !important;
    }

    .phpcart-order-summary-card {
        padding: 18px 14px !important;
        border-radius: 14px !important;
    }

    .phpcart-cart-card-header {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .phpcart-cart-card-header h3 {
        font-size: 20px !important;
    }

    .phpcart-summary-row {
        font-size: 13.5px !important;
        gap: 8px !important;
    }

    .phpcart-summary-title {
        font-size: 20px !important;
        margin-bottom: 14px !important;
        padding-bottom: 10px !important;
    }

    .phpcart-summary-total-label {
        font-size: 15px !important;
    }

    .phpcart-summary-total-price {
        font-size: 22px !important;
    }

    .phpcart-pin-header {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .phpcart-delivery-pin-box {
        padding: 10px 10px !important;
    }

    .phpcart-col-product {
        gap: 10px !important;
    }

    .phpcart-col-product img {
        width: 46px !important;
        height: 46px !important;
    }

    .phpcart-col-product-info strong {
        font-size: 13.5px !important;
    }
}

@media (max-width: 640px) {
    /* Form fields in Checkout */
    .phpcart-grid-2col,
    .phpcart-grid-3col {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .phpcart-steps {
        gap: 4px !important;
        margin-bottom: 20px !important;
    }

    .phpcart-step {
        font-size: 11px !important;
        padding-bottom: 6px !important;
        letter-spacing: -0.2px !important;
    }

    .phpcart-input, .phpcart-select, .phpcart-textarea {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }

    .phpcart-saved-address {
        padding: 10px 12px !important;
    }

    /* Account Dashboard Nav Tabs Bar */
    .account-nav-tabs {
        gap: 6px !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .account-nav-tabs .phpcart-tab-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        font-size: 12.5px !important;
        padding: 8px 12px !important;
    }

    .account-header-card {
        padding: 18px 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .account-header-card a.phpcart-btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
}
