/* ============================================================
   108 MY STYLE BUILDER — STYLESHEET
   Faithful to SuperAction.com red/dark design
   ============================================================ */

.sa-mystyle-wrap {
    font-family: Verdana, Helvetica, Arial, sans-serif;
    font-size: 12px;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
}

/* ── PROGRESS BAR ────────────────────────────────────────── */
.sa-steps-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 16px 0 24px;
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.sa-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #dedede;
    color: #666;
    border: 1px solid #ccc;
    cursor: default;
    transition: background 0.2s;
}

.sa-step.active {
    background: #cc0000;
    color: #fff;
    border-color: #990000;
}

.sa-step.done {
    background: #660000;
    color: #ffcc00;
    border-color: #440000;
}

.sa-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    font-weight: bold;
    font-size: 13px;
    flex-shrink: 0;
}

.sa-step.active .sa-step-num { background: rgba(255,255,255,0.3); }

.sa-step-label { font-weight: bold; font-size: 11px; }

.sa-step-arrow {
    color: #999;
    font-size: 18px;
    padding: 0 4px;
}

/* ── PANELS ──────────────────────────────────────────────── */
.sa-step-panel { display: none; }
.sa-step-panel.active { display: block; }

.sa-section-title {
    color: #cc0000;
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 6px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #cc0000;
}

.sa-hint {
    color: #555;
    font-size: 11px;
    margin-bottom: 14px;
    line-height: 1.6;
    background: #fff9f0;
    padding: 8px 12px;
    border-left: 3px solid #ffcc00;
}

/* ── STEP 1: DESIGN GRID ─────────────────────────────────── */
.sa-design-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 per row desktop */
    gap: 8px;
    margin: 14px 0;
    max-height: 560px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.sa-design-item {
    text-align: center;
    cursor: pointer;
    padding: 6px 4px;
    border: 2px solid #ddd;
    background: #fff;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sa-design-item:hover {
    border-color: #cc0000;
    background: #fff8f8;
    transform: scale(1.04);
}

.sa-design-item.selected {
    border-color: #cc0000;
    background: #ffeeee;
    box-shadow: 0 0 0 2px #cc0000;
}

.sa-design-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;        /* square, never cropped */
    object-fit: contain;         /* full design visible */
    background: #f0f0f0;         /* neutral bg for transparent GIFs */
    margin: 0 auto 4px;
    padding: 4px;
    box-sizing: border-box;
}

.sa-design-label {
    font-size: 10px;
    color: #666;
    font-weight: bold;
    margin-top: 2px;
}

.sa-design-item.selected .sa-design-label { color: #cc0000; }

/* ── STEP 2: APPAREL GRID ────────────────────────────────── */
.sa-apparel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* 3 per row desktop */
    gap: 12px;
    margin: 14px 0;
}

.sa-apparel-item {
    border: 2px solid #ddd;
    background: #fff;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sa-apparel-item:hover { border-color: #cc0000; background: #fff8f8; }
.sa-apparel-item.selected { border-color: #cc0000; background: #ffeeee; }

.sa-apparel-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;         /* shirt shape ratio */
    object-fit: contain;          /* full garment visible */
    background: #f0f0f0;
    margin: 0 auto 6px;
    padding: 4px;
    box-sizing: border-box;
}

.sa-apparel-name {
    font-weight: bold;
    font-size: 11px;
    color: #333;
    margin-bottom: 3px;
}

.sa-apparel-price {
    color: #cc0000;
    font-weight: bold;
    font-size: 13px;
}

.sa-price-add {
    font-size: 10px;
    color: #888;
    font-weight: normal;
    display: block;
}

/* Expanded options when apparel is clicked */
.sa-apparel-options {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
    text-align: left;
}

.sa-apparel-options label {
    display: block;
    font-size: 11px;
    color: #333;
    margin: 6px 0 2px;
}

.sa-apparel-options select {
    width: 100%;
    font-size: 11px;
    padding: 3px 4px;
    border: 1px solid #999;
    background: #fff;
    font-family: Verdana, Helvetica, Arial, sans-serif;
}

.sa-apparel-options select:focus { border-color: #cc0000; outline: none; }

/* ── STEP 2 SELECTED PREVIEW ─────────────────────────────── */
.sa-selected-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-left: 4px solid #cc0000;
    margin-bottom: 16px;
    font-size: 11px;
}

.sa-selected-preview img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #ddd;
}

.sa-preview-label { font-weight: bold; color: #666; }

/* ── STEP 3: ORDER SUMMARY ───────────────────────────────── */
.sa-order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #dedede;
    border: 1px solid #ccc;
    padding: 10px 14px;
    margin-bottom: 16px;
    gap: 12px;
}

.sa-summary-design {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sa-summary-design img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid #ccc;
    background: #fff;
}

.sa-summary-price {
    text-align: right;
    flex-shrink: 0;
}

.sa-total-label {
    font-size: 11px;
    color: #666;
    display: block;
}

.sa-total-price {
    font-size: 20px;
    font-weight: bold;
    color: #cc0000;
}

/* ── STEP 3: TEXT INPUTS ─────────────────────────────────── */
.sa-text-inputs {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 16px;
    margin-bottom: 14px;
}

.sa-field-group {
    margin-bottom: 14px;
}

.sa-field-group label {
    display: block;
    font-weight: bold;
    font-size: 11px;
    color: #333;
    margin-bottom: 4px;
}

.sa-required { color: #cc0000; }
.sa-char-hint { font-weight: normal; color: #888; font-size: 10px; }

.sa-text-input {
    width: 100%;
    max-width: 400px;
    padding: 7px 10px;
    font-size: 14px;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    border: 2px solid #ccc;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.sa-text-input:focus {
    border-color: #cc0000;
    outline: none;
    background: #fffff8;
}

.sa-char-count {
    display: inline-block;
    font-size: 10px;
    color: #888;
    margin-left: 8px;
    vertical-align: middle;
}

.sa-char-count.warn { color: #cc6600; font-weight: bold; }
.sa-char-count.full { color: #cc0000; font-weight: bold; }

/* ── QTY ─────────────────────────────────────────────────── */
.sa-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.sa-qty-row label { font-size: 12px; font-weight: bold; }

.sa-qty-input {
    width: 60px;
    padding: 6px;
    font-size: 14px;
    border: 2px solid #ccc;
    text-align: center;
    font-family: Verdana, Helvetica, Arial, sans-serif;
}

.sa-qty-input:focus { border-color: #cc0000; outline: none; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.sa-btn {
    display: inline-block;
    padding: 9px 20px;
    font-size: 12px;
    font-weight: bold;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    line-height: 1;
}

.sa-btn-next {
    background: #cc0000;
    color: #fff;
}
.sa-btn-next:hover:not([disabled]) { background: #990000; }
.sa-btn-next[disabled] { background: #999; cursor: not-allowed; opacity: 0.7; }

.sa-btn-back {
    background: #dedede;
    color: #333;
    border: 1px solid #bbb;
}
.sa-btn-back:hover { background: #ccc; }

.sa-btn-addcart {
    background: #cc0000;
    color: #fff;
    font-size: 14px;
    padding: 12px 28px;
}
.sa-btn-addcart:hover { background: #990000; }
.sa-btn-addcart:disabled { background: #999; cursor: not-allowed; }

.sa-apparel-confirm {
    width: 100%;
    margin-top: 8px;
    font-size: 11px;
    padding: 6px 10px;
}

/* ── CART MESSAGE ────────────────────────────────────────── */
.sa-cart-msg {
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: bold;
}

.sa-cart-msg.success {
    background: #f0fff0;
    border: 1px solid #5cb85c;
    color: #2d6a2d;
}

.sa-cart-msg.error {
    background: #fff0f0;
    border: 1px solid #cc0000;
    color: #cc0000;
}

.sa-cart-msg a { color: #cc0000; }

/* ── NAVIGATION ──────────────────────────────────────────── */
.sa-step-nav {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dotted #ddd;
}

/* ── UTILITY ─────────────────────────────────────────────── */
.sa-red { color: #cc0000; }
.sa-add-to-cart-section { margin-top: 8px; }

/* ── RESPONSIVE ──────────────────────────────────────────── */

/* Tablet: 3 designs, 2 apparel */
@media (max-width: 768px) {
    .sa-design-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 480px;
    }
    .sa-apparel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile landscape / large phone: 2 designs, 2 apparel */
@media (max-width: 600px) {
    .sa-steps-bar { flex-wrap: wrap; gap: 4px; }
    .sa-step-arrow { display: none; }

    .sa-design-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 400px;
        gap: 6px;
    }
    .sa-apparel-grid { grid-template-columns: repeat(2, 1fr); }
    .sa-order-summary { flex-direction: column; text-align: center; }
    .sa-summary-design { flex-direction: column; text-align: center; }
    .sa-summary-price { text-align: center; }
}

/* Mobile portrait: 1 column — big, tap-friendly */
@media (max-width: 380px) {
    .sa-design-grid {
        grid-template-columns: 1fr;
        max-height: 360px;
    }
    .sa-apparel-grid {
        grid-template-columns: 1fr;
    }
}
