/* ================================================
   Pizzaria Delivery Plugin - CSS
   App-style delivery interface
   ================================================ */

:root {
    --pd-accent: #e63946;
    --pd-accent-dark: #c1121f;
    --pd-accent-light: #fff0f0;
    --pd-wa-green: #25D366;
    --pd-wa-dark: #128C7E;
    --pd-text: #1a1a2e;
    --pd-text-muted: #6b7280;
    --pd-bg: #f8f9fa;
    --pd-surface: #ffffff;
    --pd-border: #e5e7eb;
    --pd-radius: 12px;
    --pd-radius-sm: 8px;
    --pd-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --pd-shadow-md: 0 4px 24px rgba(0,0,0,0.12);
    --pd-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Reset / Base ===== */
.pd-app, .pd-app * {
    box-sizing: border-box;
}
.pd-app {
    font-family: var(--pd-font);
    color: var(--pd-text);
    background: var(--pd-bg);
    border-radius: var(--pd-radius);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Status Bar ===== */
.pd-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    flex-wrap: wrap;
}
.pd-status-bar.pd-open {
    background: #e7f9ed;
    color: #166534;
}
.pd-status-bar.pd-closed {
    background: #fef2f2;
    color: #991b1b;
}
.pd-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pdPulse 2s infinite;
}
.pd-open .pd-status-dot { background: #16a34a; }
.pd-closed .pd-status-dot { background: #dc2626; }
.pd-status-sep { opacity: 0.4; }
@keyframes pdPulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* ===== Layout ===== */
.pd-app-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 0;
    min-height: 600px;
}
@media (max-width: 900px) {
    .pd-app-layout { grid-template-columns: 1fr; }
    .pd-cart-col { display: none; }
    .pd-cart-col.mobile-open { display: block; }
}

/* ===== Header / Banner ===== */
.pd-app-header {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    background-size: cover;
    background-position: center;
    padding: 0;
    min-height: 180px;
    display: flex;
    align-items: flex-end;
}
.pd-app-header-overlay {
    width: 100%;
    padding: 24px 24px 20px;
    background: linear-gradient(to top, rgba(10,10,20,0.92) 0%, rgba(10,10,20,0.4) 100%);
}
.pd-store-name {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.pd-store-tagline {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin: 0 0 16px;
}

/* ===== Search ===== */
.pd-search-wrap {
    position: relative;
    max-width: 400px;
}
.pd-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pd-text-muted);
    pointer-events: none;
}
.pd-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: none;
    border-radius: 50px;
    background: rgba(255,255,255,0.95);
    font-size: 14px;
    color: var(--pd-text);
    outline: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.pd-search-input:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230,57,70,0.25);
}

/* ===== Category Nav ===== */
.pd-category-nav {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--pd-surface);
    border-bottom: 1px solid var(--pd-border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.pd-category-nav::-webkit-scrollbar { display: none; }
.pd-cat-btn {
    padding: 7px 16px;
    border: 1.5px solid var(--pd-border);
    border-radius: 50px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--pd-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s;
}
.pd-cat-btn:hover {
    border-color: var(--pd-accent);
    color: var(--pd-accent);
}
.pd-cat-btn.active {
    background: var(--pd-accent);
    border-color: var(--pd-accent);
    color: #fff;
}

/* ===== Products Grid ===== */
.pd-products-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* ===== Product Card ===== */
.pd-product-card {
    background: var(--pd-surface);
    border-radius: var(--pd-radius);
    border: 1px solid var(--pd-border);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.pd-product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pd-shadow-md);
}
.pd-product-card.pd-featured {
    border-color: var(--pd-accent);
    position: relative;
}
.pd-product-img-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 58%;
    overflow: hidden;
    background: #f3f4f6;
}
.pd-product-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.pd-product-card:hover .pd-product-img {
    transform: scale(1.05);
}
.pd-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--pd-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pd-product-tags {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}
.pd-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 50px;
    font-weight: 600;
}
.pd-tag-veg { background: #dcfce7; color: #15803d; }
.pd-tag-spicy { background: #fef3c7; color: #b45309; }

.pd-product-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pd-product-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0;
    line-height: 1.3;
}
.pd-product-desc {
    font-size: 12px;
    color: var(--pd-text-muted);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}
.pd-product-meta-row {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--pd-text-muted);
    align-items: center;
}
.pd-prep-time { display: flex; align-items: center; gap: 3px; }
.pd-product-footer {
    padding: 0 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pd-product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--pd-accent);
}
.pd-product-price small {
    font-size: 12px;
    font-weight: 500;
    color: var(--pd-text-muted);
}
.pd-add-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pd-accent);
    color: #fff;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    font-weight: 300;
}
.pd-add-btn:hover {
    background: var(--pd-accent-dark);
    transform: scale(1.1);
}
.pd-add-btn:active { transform: scale(0.95); }

/* ===== Cart Sidebar ===== */
.pd-cart-col {
    background: var(--pd-surface);
    border-left: 1px solid var(--pd-border);
}
.pd-cart-sticky {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.pd-cart-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--pd-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pd-cart-header h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-cart-count {
    background: var(--pd-accent);
    color: #fff;
    border-radius: 50px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

/* ===== Cart Items ===== */
.pd-cart-items {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}
.pd-cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--pd-text-muted);
}
.pd-cart-empty-icon { font-size: 40px; margin-bottom: 8px; }
.pd-cart-empty p { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.pd-cart-empty small { font-size: 12px; }

.pd-cart-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--pd-border);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.pd-cart-item-img {
    width: 52px; height: 52px;
    border-radius: var(--pd-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.pd-cart-item-info { flex: 1; min-width: 0; }
.pd-cart-item-name {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-cart-item-opts {
    font-size: 11px;
    color: var(--pd-text-muted);
    margin: 0 0 6px;
    line-height: 1.4;
}
.pd-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pd-item-qty-btn {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--pd-border);
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pd-text-muted);
    transition: all 0.15s;
}
.pd-item-qty-btn:hover {
    border-color: var(--pd-accent);
    color: var(--pd-accent);
}
.pd-item-qty { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.pd-cart-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--pd-accent);
    flex-shrink: 0;
}
.pd-cart-item-remove {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 13px;
    padding: 2px;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.pd-cart-item-remove:hover { opacity: 1; }

/* ===== Cart Totals ===== */
.pd-cart-totals {
    padding: 16px 20px 20px;
    border-top: 2px dashed var(--pd-border);
}
.pd-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--pd-text-muted);
}
.pd-total-row:first-child { color: var(--pd-text); }
.pd-total-final {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--pd-text) !important;
    border-top: 1px solid var(--pd-border);
    margin-top: 6px;
    padding-top: 10px !important;
}
.pd-total-final span:last-child { color: var(--pd-accent); }

.pd-min-order-warn {
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: var(--pd-radius-sm);
    margin: 8px 0;
}

.pd-btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--pd-accent);
    color: #fff;
    border: none;
    border-radius: var(--pd-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    transition: background 0.18s, transform 0.15s;
    letter-spacing: 0.3px;
}
.pd-btn-checkout:hover { background: var(--pd-accent-dark); }
.pd-btn-checkout:active { transform: scale(0.98); }
.pd-btn-checkout:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* ===== Float Cart (mobile) ===== */
.pd-float-cart {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    filter: drop-shadow(0 4px 16px rgba(230,57,70,0.35));
}
.pd-float-cart-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--pd-accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    min-width: 260px;
    transition: background 0.15s;
}
.pd-float-count {
    background: rgba(0,0,0,0.25);
    border-radius: 50px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 800;
}
.pd-float-label { flex: 1; }
.pd-float-total { font-weight: 800; }

/* ===== Loading ===== */
.pd-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--pd-text-muted);
}
.pd-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--pd-border);
    border-top-color: var(--pd-accent);
    border-radius: 50%;
    animation: pdSpin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes pdSpin { to { transform: rotate(360deg); } }

.pd-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--pd-text-muted);
}
.pd-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ===== Modal ===== */
.pd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    animation: pdFadeIn 0.2s;
}
@keyframes pdFadeIn { from { opacity: 0; } to { opacity: 1; } }

.pd-modal-box {
    background: var(--pd-surface);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: pdSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
@keyframes pdSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pd-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--pd-text-muted);
    z-index: 10;
    transition: background 0.15s;
}
.pd-modal-close:hover { background: #e5e7eb; color: var(--pd-text); }

/* ===== Product Options Modal ===== */
.pd-modal-content {
    padding: 24px 24px 0;
}
.pd-modal-product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--pd-radius);
    margin-bottom: 16px;
    display: block;
}
.pd-modal-product-name {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
}
.pd-modal-product-desc {
    font-size: 14px;
    color: var(--pd-text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}
.pd-modal-product-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--pd-accent);
    margin: 0 0 20px;
}
.pd-options-section {
    margin-bottom: 20px;
}
.pd-options-section h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pd-text-muted);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--pd-border);
}
.pd-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pd-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 14px;
}
.pd-option-item:hover {
    border-color: var(--pd-accent);
    background: var(--pd-accent-light);
}
.pd-option-item input[type="radio"],
.pd-option-item input[type="checkbox"] {
    accent-color: var(--pd-accent);
    width: 16px; height: 16px;
    flex-shrink: 0;
}
.pd-option-label { flex: 1; }
.pd-option-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--pd-text-muted);
}
.pd-option-item.selected {
    border-color: var(--pd-accent);
    background: var(--pd-accent-light);
}
.pd-notes-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-size: 14px;
    font-family: var(--pd-font);
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
.pd-notes-input:focus { border-color: var(--pd-accent); }

.pd-modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--pd-surface);
    padding: 16px 24px;
    border-top: 1px solid var(--pd-border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.pd-qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 4px 6px;
}
.pd-qty-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--pd-surface);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pd-text);
    transition: background 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.pd-qty-btn:hover { background: var(--pd-accent); color: #fff; }
.pd-qty-val { font-size: 16px; font-weight: 800; min-width: 24px; text-align: center; }

.pd-btn-add-confirm {
    flex: 1;
    padding: 12px 16px;
    background: var(--pd-accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.pd-btn-add-confirm:hover { background: var(--pd-accent-dark); }
.pd-btn-add-confirm:active { transform: scale(0.97); }

/* ===== Checkout Modal ===== */
.pd-checkout-box {
    max-width: 560px;
}
.pd-checkout-header {
    padding: 24px 24px 0;
}
.pd-checkout-steps {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}
.pd-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pd-text-muted);
    flex: 1;
    justify-content: center;
}
.pd-step.active { color: var(--pd-accent); }
.pd-step.done { color: #16a34a; }
.pd-step-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--pd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.pd-step.active .pd-step-num { background: var(--pd-accent); color: #fff; }
.pd-step.done .pd-step-num { background: #16a34a; color: #fff; }
.pd-step-line { flex: 0.3; height: 1.5px; background: var(--pd-border); }

.pd-checkout-step { padding: 20px 24px; display: none; }
.pd-checkout-step.active { display: block; }
.pd-checkout-step h3 { font-size: 18px; font-weight: 800; margin: 0 0 16px; }

.pd-checkout-items-list { margin-bottom: 16px; }
.pd-co-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--pd-border);
    font-size: 14px;
    gap: 10px;
}
.pd-co-item-name { flex: 1; font-weight: 600; }
.pd-co-item-qty { color: var(--pd-text-muted); font-size: 12px; }
.pd-co-item-price { font-weight: 700; color: var(--pd-accent); }
.pd-checkout-totals { margin-top: 12px; }

/* Form */
.pd-form-group {
    margin-bottom: 14px;
}
.pd-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pd-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.pd-form-group input,
.pd-form-group select,
.pd-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-size: 14px;
    font-family: var(--pd-font);
    color: var(--pd-text);
    background: var(--pd-surface);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pd-form-group input:focus,
.pd-form-group select:focus,
.pd-form-group textarea:focus {
    border-color: var(--pd-accent);
    box-shadow: 0 0 0 3px rgba(230,57,70,0.12);
}
.pd-form-group textarea { resize: vertical; }

.pd-step-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.pd-btn-next {
    flex: 1;
    padding: 13px;
    background: var(--pd-accent);
    color: #fff;
    border: none;
    border-radius: var(--pd-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.pd-btn-next:hover { background: var(--pd-accent-dark); }
.pd-btn-back {
    padding: 13px 18px;
    background: transparent;
    color: var(--pd-text-muted);
    border: 1.5px solid var(--pd-border);
    border-radius: var(--pd-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.pd-btn-back:hover { border-color: var(--pd-accent); color: var(--pd-accent); }

/* Confirm summary */
.pd-confirm-summary {
    background: var(--pd-bg);
    border-radius: var(--pd-radius);
    padding: 16px;
    margin-bottom: 20px;
}
.pd-confirm-row {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--pd-border);
}
.pd-confirm-row:last-child { border: none; }
.pd-confirm-row strong { color: var(--pd-text-muted); width: 90px; flex-shrink: 0; }
.pd-confirm-row span { flex: 1; font-weight: 600; }

/* WhatsApp CTA */
.pd-whatsapp-cta-box {
    text-align: center;
    padding: 24px 16px;
    background: #e7fff0;
    border-radius: var(--pd-radius);
    margin-bottom: 16px;
    border: 1.5px solid #b7f1cc;
}
.pd-wa-icon-big { font-size: 48px; margin-bottom: 12px; }
.pd-whatsapp-cta-box p {
    font-size: 15px;
    color: #166534;
    margin: 0 0 20px;
    line-height: 1.6;
}
.pd-btn-whatsapp-final {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    background: var(--pd-wa-green);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    letter-spacing: 0.2px;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37,211,102,0.35);
}
.pd-btn-whatsapp-final:hover {
    background: var(--pd-wa-dark);
    transform: translateY(-1px);
}
.pd-btn-whatsapp-final:active { transform: scale(0.97); }
.pd-wa-note {
    display: block;
    font-size: 12px;
    color: #166534;
    opacity: 0.7;
    margin-top: 12px;
}

/* Thank-you page WhatsApp */
.pd-whatsapp-cta {
    margin: 24px 0;
}
.pd-whatsapp-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #e7fff0;
    border-radius: var(--pd-radius);
    padding: 24px;
    border: 1.5px solid #b7f1cc;
}
.pd-whatsapp-box .pd-wa-icon { font-size: 48px; }
.pd-whatsapp-box h3 { margin: 0 0 8px; font-size: 18px; color: #166534; }
.pd-whatsapp-box p { margin: 0 0 16px; color: #166534; opacity: 0.8; font-size: 14px; }
.pd-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--pd-wa-green);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.15s;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}
.pd-btn-whatsapp:hover { background: var(--pd-wa-dark); }

/* ===== Toast ===== */
.pd-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
    max-width: 90vw;
}
.pd-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.pd-toast.success { background: #166534; }
.pd-toast.error { background: #991b1b; }

/* ===== Admin CSS ===== */
.pd-admin-wrap { max-width: 1100px; }
.pd-admin-header {
    display: flex;
    align-items: center;
    padding: 16px 0 8px;
    border-bottom: 2px solid #e63946;
    margin-bottom: 24px;
}
.pd-admin-header h1 { font-size: 24px; margin: 0; }
.pd-admin-header h1 span { color: #666; font-weight: 400; }
.pd-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.pd-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0;
}
.pd-card h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-card h3 { font-size: 14px; margin: 16px 0 8px; }
.pd-card-whatsapp { border-color: #25D366; }
.pd-card-whatsapp h2 { color: #166534; }
.pd-vars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.pd-var-tag {
    font-size: 12px;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
}
.pd-save-btn { margin-top: 8px !important; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .pd-products-grid { grid-template-columns: 1fr 1fr; padding: 12px; gap: 12px; }
    .pd-store-name { font-size: 22px; }
    .pd-app-header { min-height: 140px; }
    .pd-settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .pd-products-grid { grid-template-columns: 1fr; }
    .pd-float-cart-btn { min-width: 220px; }
    .pd-modal-box { max-height: 95vh; border-radius: 16px 16px 0 0; align-self: flex-end; }
    .pd-modal-overlay { align-items: flex-end; padding: 0; }
}

/* ===== Accent color override via JS ===== */
.pd-app[data-accent] .pd-add-btn,
.pd-app[data-accent] .pd-btn-checkout,
.pd-app[data-accent] .pd-btn-add-confirm,
.pd-app[data-accent] .pd-btn-next,
.pd-app[data-accent] .pd-float-cart-btn,
.pd-app[data-accent] .pd-cart-count,
.pd-app[data-accent] .pd-featured-badge {
    background: var(--pd-dynamic-accent, var(--pd-accent));
}
.pd-app[data-accent] .pd-cat-btn.active {
    background: var(--pd-dynamic-accent, var(--pd-accent));
    border-color: var(--pd-dynamic-accent, var(--pd-accent));
}
.pd-app[data-accent] .pd-product-price,
.pd-app[data-accent] .pd-cart-item-price,
.pd-app[data-accent] .pd-co-item-price {
    color: var(--pd-dynamic-accent, var(--pd-accent));
}
