/**
 * Clothing Showcase Platform — additive styles
 *
 * Layered ON TOP of the original prime-pm.css. Only ADDS or refines styles
 * for the clothing-specific UI bits (size buttons, discount badges, sticky
 * mobile Buy bar, order modal, image-hint card, seller storefront).
 *
 * Nothing in the original .ppm-* classes is overridden destructively.
 */

/* ===== Card refinements ===== */
.csp-product-card .ppm-card-img {
    background-size: cover;
    background-position: center;
}
.csp-card-brand {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 600;
    margin: 4px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.csp-card-price {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.csp-price-now {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
}
.csp-price-mrp {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
}
.csp-price-off {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
}
.csp-card-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.csp-size-chip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #6b7280;
    background: #fff;
    font-weight: 600;
}
.csp-discount-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.72rem;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}
.csp-subcat-badge {
    background: #eff6ff !important;
    color: #1e40af !important;
}
.csp-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}
.csp-badge--low {
    background: #fef3c7;
    color: #92400e;
}

/* ===== Filter bar — minor refinement ===== */
.csp-filter-bar .ppm-filter-group {
    min-width: 140px;
}

/* ===== Submit-product form ===== */
.csp-product-form .ppm-form-section-title {
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.csp-size-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.csp-size-check {
    cursor: pointer;
    user-select: none;
}
.csp-size-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.csp-size-check span {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
    color: #374151;
    transition: all 0.15s;
    min-width: 50px;
    text-align: center;
}
.csp-size-check:hover span {
    border-color: #9ca3af;
}
.csp-size-check input:checked + span {
    border-color: var(--ppm-primary, #e63946);
    background: var(--ppm-primary, #e63946);
    color: #fff;
}

.csp-image-hint {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #075985;
}
.csp-image-hint ul {
    margin: 6px 0 6px 18px;
    padding: 0;
}
.csp-image-hint code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.78rem;
    border: 1px solid #bae6fd;
}

/* ===== Single product page ===== */
.csp-product-title {
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 0 0 4px;
}
.csp-product-brand {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 12px;
}
.csp-product-brand strong {
    color: #111827;
}
.csp-product-price {
    margin: 0 0 4px;
    font-size: 1.5rem;
}
.csp-product-price .csp-price-now {
    font-size: 1.8rem;
    color: #059669;
}
.csp-price-tax-note {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 18px;
}
.csp-spec-grid .ppm-spec-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 12px;
}
.csp-product-desc h3 {
    font-size: 1.05rem;
    margin: 18px 0 10px;
    color: #111827;
}
.csp-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}
.csp-tag {
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Size buttons on product page ===== */
.csp-size-section {
    margin: 20px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
}
.csp-size-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.csp-size-section-head strong {
    font-size: 0.95rem;
    color: #111827;
}
.csp-size-section-head small {
    color: #9ca3af;
    font-size: 0.75rem;
}
.csp-size-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.csp-size-btn {
    min-width: 56px;
    padding: 12px 18px;
    border: 2px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.95rem;
}
.csp-size-btn:hover {
    border-color: #6b7280;
}
.csp-size-btn--active {
    border-color: var(--ppm-primary, #e63946);
    background: var(--ppm-primary, #e63946);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
}

/* ===== Buy on WhatsApp button ===== */
.csp-buy-card {
    margin-top: 24px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
}
.csp-buy-btn {
    width: 100%;
    padding: 16px 24px !important;
    font-size: 1.05rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.csp-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
}
.csp-buy-btn:disabled {
    background: #d1d5db !important;
    box-shadow: none;
    cursor: not-allowed;
}
.csp-buy-note {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
}

/* ===== Order modal ===== */
.csp-order-modal-box {
    max-width: 560px !important;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}
.csp-order-modal-head {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.csp-order-modal-head h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}
.csp-order-modal-head p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}
.csp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.csp-form-grid .ppm-form-group--full {
    grid-column: 1 / -1;
}
.csp-form-grid .ppm-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.csp-form-grid input,
.csp-form-grid textarea,
.csp-form-grid select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: 0.9rem;
    box-sizing: border-box;
    font-family: inherit;
}
.csp-form-grid input:focus,
.csp-form-grid textarea:focus,
.csp-form-grid select:focus {
    outline: none;
    border-color: var(--ppm-primary, #e63946);
}
.csp-order-submit {
    width: 100%;
    margin-top: 16px;
    padding: 14px 24px !important;
    font-size: 1rem !important;
    background: #25d366 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 800;
    cursor: pointer;
}
.csp-order-submit:hover {
    background: #1ebe5d !important;
}
.csp-modal-disclaimer {
    margin: 12px 0 0;
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
}

/* ===== Sticky mobile Buy bar ===== */
.csp-sticky-buy {
    display: none;
}
@media (max-width: 768px) {
    .csp-sticky-buy {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        padding: 10px 14px;
        gap: 10px;
        align-items: center;
        z-index: 90;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    }
    .csp-sticky-price {
        flex: 0 0 auto;
        font-size: 1rem;
        font-weight: 800;
    }
    .csp-sticky-buy .ppm-btn {
        flex: 1;
        padding: 12px !important;
        font-size: 0.92rem !important;
        background: #25d366 !important;
        color: #fff !important;
        border: none !important;
        font-weight: 800;
    }
    /* push the page up so sticky bar doesn't cover content */
    body { padding-bottom: 70px !important; }
}

/* ===== Categories grid (homepage tiles) ===== */
.csp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.csp-category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    transition: transform 0.15s, box-shadow 0.15s;
    font-weight: 700;
}
.csp-category-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.csp-category-tile--men    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.csp-category-tile--women  { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.csp-category-tile--kids   { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.csp-category-tile--unisex { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.csp-cat-icon {
    font-size: 2.5rem;
    margin-bottom: 6px;
}
.csp-cat-name {
    font-size: 1.05rem;
}

/* ===== Seller storefront ===== */
.csp-seller-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 28px;
    background: linear-gradient(135deg, #e63946, #c1272d);
    color: #fff;
    border-radius: 16px;
    margin-bottom: 24px;
}
.csp-seller-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
}
.csp-seller-name {
    margin: 0 0 6px;
    font-size: 1.6rem;
    color: #fff;
}
.csp-seller-stats {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
}
.csp-seller-stats span {
    margin-right: 16px;
}

/* ===== Sub-admin dashboard ===== */
.csp-subadmin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.csp-subadmin-grid .ppm-stat-card.csp-cap-off {
    opacity: 0.45;
}

/* ===== Mobile tweaks for product form ===== */
@media (max-width: 768px) {
    .csp-form-grid {
        grid-template-columns: 1fr;
    }
    .csp-product-title {
        font-size: 1.3rem;
    }
    .csp-product-price .csp-price-now {
        font-size: 1.4rem;
    }
}
