/* ============================================================
   Storefront styling (Shop grid / Product detail / Cart)
   Black + gold Arena theme.
   ============================================================ */

.store {
    width: 100%;
    padding-top: 30px;
    margin-bottom: 40px;
    color: #1a1a1a;
}

.store h1 { font-size: 34px; margin: 0 0 6px 0; }
.store-sub { color: #777; font-size: 16px; margin-bottom: 24px; }

/* ---- Buttons (shared) ---- */
.store-btn {
    display: inline-block;
    padding: 11px 26px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 9px;
    border: 1px solid #1a1a1a;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
}

.store-btn-primary { background: #1a1a1a; color: #fff; }
.store-btn-primary:hover { background: #000; color: #FFD600; }

.store-btn-secondary { background: #ececec; color: #333; border-color: #d5d5d5; }
.store-btn-secondary:hover { background: #e0e0e0; }

.store-btn[disabled], .store-btn.is-disabled {
    background: #d9d9d9; color: #888; border-color: #d9d9d9; cursor: default;
}

/* ---- Product grid ---- */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.product-card {
    width: 250px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}

.product-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .12); transform: translateY(-2px); }

.product-card a { text-decoration: none; color: inherit; }

/* The View button is an <a>, so give it enough specificity to beat the
   ".product-card a { color: inherit }" rule above (which was hiding its text). */
.product-card .store-btn-primary { color: #fff; }
.product-card .store-btn-primary:hover { color: #FFD600; }

.product-thumb {
    width: 100%;
    height: 230px;
    object-fit: contain;
    background: #fff;
    display: block;
}

.product-thumb-empty {
    width: 100%;
    height: 230px;
    background: #f0f0f0 repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 10px, #eaeaea 10px, #eaeaea 20px);
}

.product-body { padding: 14px 16px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.product-name { font-size: 18px; font-weight: 600; margin: 0 0 6px 0; }
.product-price { font-size: 18px; font-weight: 700; color: #1a1a1a; margin-bottom: 12px; }
.product-card .store-btn { text-align: center; margin-top: auto; }

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}
.tag-soldout { background: #f4d7d5; color: #b3261e; }
.tag-members { background: #f3e8ff; color: #7a29b8; }

/* ---- Product detail ---- */
.detail {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}
.detail-media {
    flex: 1 1 360px;
    max-width: 480px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 3px 16px rgba(0, 0, 0, .07);
}
.detail-media img { width: 100%; border-radius: 10px; display: block; }
.detail-media .product-thumb-empty { border-radius: 10px; height: 380px; }
.detail-main-img { object-fit: contain; background: #fff; max-height: 460px; }

.detail-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.detail-thumb {
    width: 68px !important;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e4e4e4;
    cursor: pointer;
    transition: border-color .12s ease;
}
.detail-thumb:hover { border-color: #bbb; }
.detail-thumb.is-active { border-color: #1a1a1a; }
.detail-info { flex: 1 1 340px; }
.detail-info h1 { font-size: 32px; margin: 0 0 4px 0; line-height: 1.15; }
.detail-price { font-size: 28px; font-weight: 800; color: #1a1a1a; margin: 4px 0 18px 0; }
.detail-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    white-space: pre-wrap;
    margin: 18px 0;
    padding: 16px 0;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
}

/* Purchase controls in a soft card */
.detail-buy {
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 20px;
    max-width: 420px;
}
.detail-field { margin-bottom: 18px; }
.detail-field label { display: block; font-weight: 700; margin-bottom: 7px; font-size: 15px; }
.detail-select, .detail-qty {
    padding: 10px 12px;
    border: 1px solid #c9c9c9;
    border-radius: 8px;
    font-size: 15px;
    color: #000;
    background: #fff;
}
.detail-select:focus, .detail-qty:focus {
    border-color: #FFC400;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 214, 0, .28);
}
.detail-select { min-width: 200px; }
.detail-qty { width: 90px; }

.qty-row { display: flex; align-items: center; gap: 12px; }
.detail-stock { font-size: 14px; font-weight: 600; color: #1f7a35; }
.detail-buy .store-btn { width: 100%; text-align: center; margin-top: 4px; }

.notice {
    background: #fff8d6;
    border: 1px solid #f0dd7a;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 16px;
    margin-bottom: 18px;
}
.msg-ok { color: #1f7a35; font-weight: 600; }

/* ---- Cart ---- */
table.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.cart-table th {
    background: #2b2b2b; color: #fff; text-align: left; padding: 12px 14px; font-size: 14px;
}
.cart-table td { padding: 12px 14px; border-top: 1px solid #eee; vertical-align: middle; font-size: 15px; }
.cart-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid #ddd; }
.cart-opts { color: #777; font-size: 13px; }
.cart-qty { width: 64px; padding: 7px 9px; border: 1px solid #c9c9c9; border-radius: 7px; font-size: 15px; }
.cart-remove { color: #b3261e; font-weight: 600; text-decoration: none; }
.cart-remove:hover { text-decoration: underline; }

.cart-summary {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
}
.cart-totals { border-collapse: collapse; min-width: 280px; }
.cart-totals td { padding: 7px 12px; font-size: 16px; color: #555; }
.cart-totals .ct-label { text-align: left; }
.cart-totals .ct-amt {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.cart-totals .ct-total td {
    font-size: 21px;
    font-weight: 700;
    color: #1a1a1a;
    border-top: 2px solid #e0e0e0;
    padding-top: 11px;
}
.cart-actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.empty-cart { font-size: 18px; color: #666; padding: 20px 0; }

/* ---- My Orders ---- */
.order-card {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    margin-bottom: 20px;
}
.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 17px;
}
.tag-paid { background: #e7edff; color: #2a49b8; }
.tag-shipped { background: #e5f5e0; color: #1f7a35; }
.tag-cancelled { background: #f4d7d5; color: #b3261e; }
