:root {
    --bg-main: #1f1f1f;
    --bg-card: #111111;
    --bg-soft: #2b2b2b;
    --yellow: #ffcc00;
    --yellow-soft: #ffdb4d;
    --text-main: #ffffff;
    --text-muted: #bdbdbd;
    --border-soft: #3d3d3d;
    --danger: #ff7777;
}

* {
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top, #3a3a3a 0%, #202020 45%, #141414 100%);
    color: var(--text-main);
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* HEADER */
header {
    background: rgba(0, 0, 0, 0.92);
    color: var(--yellow);
    padding: 14px 18px;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.header-container {
    max-width: 1280px;
    margin: auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 13px;
}

.header-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-section h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.3px;
}

.logo-section p {
    margin: 3px 0 0 0;
    color: var(--yellow-soft);
    font-size: 13px;
}

/* MAIN */
main {
    max-width: 1280px;
    margin: auto;
    padding: 18px;
}

/* HERO */
.catalog-hero {
    background:
        linear-gradient(135deg, rgba(255, 204, 0, 0.18), rgba(0, 0, 0, 0.68)),
        radial-gradient(circle at right, rgba(255, 204, 0, 0.18), transparent 32%);
    border: 1px solid rgba(255, 204, 0, 0.24);
    border-radius: 24px;
    padding: 12px 24px;
    margin-bottom: 18px;
    box-shadow: 0 12px 34px rgba(0,0,0,0.35);
}

.catalog-hero h1 {
    margin: 0;
    color: var(--yellow);
    font-size: 24px;
    line-height: 1.1;
}

.catalog-hero p {
    margin: 10px 0 0;
    color: #eeeeee;
    font-size: 15px;
    max-width: 650px;
    line-height: 1.5;
}

/* FILTROS */
.catalog-toolbar {
    background: rgba(0, 0, 0, 0.52);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 160px 180px;
    gap: 10px;
    margin-bottom: 14px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.catalog-toolbar input,
.catalog-toolbar select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 13px;
    font-size: 14px;
    outline: none;
    background: #f6f6f6;
    color: #111;
}

.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.18);
}

/* ESTADO */
.catalog-status {
    color: var(--yellow-soft);
    font-size: 13px;
    margin: 0 0 14px;
    text-align: right;
}

/* GRID */
.catalog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 18px;
}

/* CARD */
.product-card {
    background:
        linear-gradient(180deg, rgba(24,24,24,0.96) 0%, rgba(10,10,10,0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0,0,0,0.38);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(0,0,0,0.68);
    border-color: rgba(255, 204, 0, 0.55);
}

.product-gallery {
    background: #050505;
    padding: 10px;
    position: relative;
}

.main-product-image {
    width: 100%;
    height: 310px;
    object-fit: contain;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.10), transparent 28%),
        linear-gradient(180deg, #242424 0%, #101010 100%);
    border-radius: 20px;
}

/* INFO CARD */
.product-info {
    padding: 13px;
}

.product-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.3;
    min-height: 30px;
    margin-bottom: 0px;
}

.price {
    display: inline-block;
    color: var(--yellow);
    font-size: 19px;
    font-weight: bold;
    margin-bottom: 0px;
}

.sizes-section {
    margin-top: 7px;
    border-top: 1px solid #2d2d2d;
    padding-top: 9px;
}

.sizes-title {
    color: var(--text-muted);
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sizes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-pill {
    background: rgba(255, 204, 0, 0.12);
    color: var(--yellow);
    border: 1px solid rgba(255, 204, 0, 0.45);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    min-width: 34px;
    text-align: center;
}

.no-stock {
    color: var(--danger);
    font-size: 13px;
}

.locations {
    margin-top: 10px;
    font-size: 12px;
    color: #d0d0d0;
    line-height: 1.45;
}

/* MODAL PRODUCTO */
.product-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    overflow: auto;
    background-color: rgba(0,0,0,0.90);
    padding: 22px;
}

.product-modal-content {
    background:
        linear-gradient(180deg, rgba(25,25,25,0.98) 0%, rgba(8,8,8,0.98) 100%);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 24px;
    max-width: 1100px;
    margin: auto;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.8fr);
    gap: 18px;
    position: relative;
    box-shadow: 0 18px 60px rgba(0,0,0,0.85);
}

.close-product-modal {
    position: absolute;
    top: 8px;
    right: 18px;
    color: var(--yellow);
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
}

.modal-gallery {
    width: 100%;
}

#modalMainImage {
    width: 100%;
    height: 640px;
    object-fit: contain;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 30%),
        linear-gradient(180deg, #222 0%, #101010 100%);
    border-radius: 20px;
}

.modal-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 3px;
}

.modal-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    background: #333;
    flex: 0 0 auto;
}

.modal-thumbs img.active {
    border-color: var(--yellow);
}

.modal-info {
    padding: 16px;
    background: rgba(0,0,0,0.34);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
}

.modal-info h2 {
    color: var(--yellow);
    margin: 18px 0 8px;
    font-size: 24px;
    line-height: 1.25;
}

.modal-price {
    color: var(--yellow);
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 15px;
}

.modal-info p {
    margin: 7px 0;
    font-size: 14px;
    color: #eeeeee;
}

.modal-info strong {
    color: var(--yellow-soft);
}

/* BOTONES */
.btn-buy {
    width: 100%;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--yellow), #ffd84d);
    color: #111;
    border: none;
    padding: 13px;
    border-radius: 11px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.32);
}

#cmbTallaCompra {
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: 1px solid #555;
    background: #f5f5f5;
    font-size: 14px;
}

/* MODAL COMPRA PRO */
.purchase-modal {
    display: none;
    position: fixed;
     z-index: 30000;
    inset: 0;
    overflow: auto;
    background:
        radial-gradient(circle at top, rgba(255, 204, 0, 0.12), transparent 35%),
        rgba(0,0,0,0.92);
    padding: 22px;
}

.purchase-modal-content {
    background:
        linear-gradient(180deg, rgba(28,28,28,0.98) 0%, rgba(10,10,10,0.98) 100%);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 22px;
    max-width: 520px;
    margin: 20px auto;
    padding: 24px;
    position: relative;
    box-shadow: 0 18px 55px rgba(0,0,0,0.85);
}

.purchase-modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255,204,0,0.55),
        transparent,
        rgba(255,255,255,0.10)
    );

    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);

    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
}

.purchase-modal-content h2 {
    color: var(--yellow);
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.2;
}

.purchase-modal-content h2::after {
    content: "Completa tus datos y te contactaremos por WhatsApp.";
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: normal;
    margin-top: 6px;
}

.close-purchase-modal {
    position: absolute;
    top: 12px;
    right: 18px;
    color: var(--yellow);
    font-size: 34px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.purchase-summary {
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255, 204, 0, 0.22);
    border-radius: 16px;
    padding: 14px;
    margin: 18px 0;
    line-height: 1.7;
    font-size: 14px;
}

.purchase-summary strong {
    color: var(--yellow-soft);
}

.purchase-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.purchase-form label {
    color: var(--yellow-soft);
    font-size: 12px;
    font-weight: bold;
    margin-top: 3px;
    letter-spacing: 0.2px;
}

.purchase-form input,
.purchase-form select,
.purchase-form textarea {
    width: 100%;
    padding: 12px 13px;
    border-radius: 13px;
    border: 1px solid rgba(255,255,255,0.14);
    outline: none;
    background: #f4f4f4;
    color: #111;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.purchase-form input:focus,
.purchase-form select:focus,
.purchase-form textarea:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.16);
}

.purchase-form textarea {
    min-height: 78px;
    resize: vertical;
}

#btnEnviarCompra {
    margin-top: 16px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .catalog-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .catalog-toolbar input {
        grid-column: span 2;
    }

    .product-modal-content {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    #modalMainImage {
        height: 520px;
    }
}

@media (max-width: 700px) {
    header {
        padding: 12px;
    }

    main {
        padding: 12px;
    }

    .logo-section h2 {
        font-size: 18px;
    }

    .logo-section p {
        font-size: 12px;
    }

    .catalog-hero {
        padding: 0px;
        border-radius: 14px;
    }

    .catalog-hero h1 {
        font-size: 20px;
    }

    .catalog-toolbar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .catalog-toolbar input {
        grid-column: span 1;
    }

    .catalog-status {
        text-align: left;
    }

    .catalog-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .product-card {
        background: rgba(17, 17, 17, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 22px;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0,0,0,0.38);
        display: flex;
        flex-direction: column;
        cursor: pointer;
        transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
        backdrop-filter: blur(8px);
    }

    .product-gallery {
        background: linear-gradient(180deg, #0b0b0b 0%, #1d1d1d 100%);
        padding: 12px;
        position: relative;
    }

    .main-product-image {
        height: 300px;
        border-radius: 11px;
    }

    .product-info {
        padding: 9px;
    }

    .product-title {
        font-size: 13px;
        min-height: 34px;
    }

    .price {
        font-size: 13px;
        padding: 5px 8px;
    }

    .sizes-title {
        font-size: 10px;
    }

    .size-pill {
        font-size: 10px;
        padding: 4px 6px;
    }

    .product-modal {
        padding: 9px;
    }

    .product-modal-content {
        padding: 12px;
        border-radius: 15px;
    }

    #modalMainImage {
        height: 410px;
    }

    .modal-info {
        padding: 11px;
    }

    .modal-info h2 {
        font-size: 20px;
        margin-top: 10px;
    }

    .modal-price {
        font-size: 22px;
    }

    .purchase-modal {
        padding: 9px;
    }

    .purchase-modal-content {
        padding: 16px;
        border-radius: 15px;
    }
}

@media (max-width: 430px) {
    .main-product-image {
        height: 285px;
    }

    #modalMainImage {
        height: 350px;
    }

    .catalog-hero {
        padding: 18px;
    }
}

/* CARRITO FLOTANTE */
.cart-floating-button {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10002;
    background: linear-gradient(135deg, var(--yellow), #ffe477);
    color: #111;
    border-radius: 999px;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0,0,0,0.55);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cart-floating-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 38px rgba(0,0,0,0.70);
}

.cart-icon {
    font-size: 20px;
}

#cartCount {
    background: #111;
    color: var(--yellow);
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 0 6px;
}

/* MODAL CARRITO */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    inset: 0;
    overflow: auto;
    background:
        radial-gradient(circle at top, rgba(255, 204, 0, 0.12), transparent 35%),
        rgba(0,0,0,0.92);
    padding: 22px;
}

.cart-modal-content {
    background:
        linear-gradient(180deg, rgba(28,28,28,0.98) 0%, rgba(10,10,10,0.98) 100%);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 22px;
    max-width: 720px;
    margin: 25px auto;
    padding: 24px;
    position: relative;
    box-shadow: 0 18px 55px rgba(0,0,0,0.85);
}

.cart-modal-content h2 {
    color: var(--yellow);
    margin: 0;
    font-size: 25px;
}

.cart-subtitle {
    color: var(--text-muted);
    margin: 6px 0 18px;
    font-size: 14px;
}

.close-cart-modal {
    position: absolute;
    top: 12px;
    right: 18px;
    color: var(--yellow);
    font-size: 34px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 10px;
    border: 1px dashed rgba(255,255,255,0.18);
    border-radius: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 78px 1fr auto;
    gap: 12px;
    align-items: center;
    background: rgba(0,0,0,0.48);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    padding: 10px;
}

.cart-item img {
    width: 78px;
    height: 78px;
    object-fit: contain;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.10), transparent 35%),
        #151515;
    border-radius: 13px;
}

.cart-item-info strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.25;
    margin-bottom: 5px;
}

.cart-item-info span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
}

.cart-item-price {
    color: var(--yellow);
    font-weight: bold;
    margin-top: 5px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cart-qty-btn,
.cart-remove-btn {
    border: none;
    cursor: pointer;
    border-radius: 9px;
    font-weight: bold;
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 204, 0, 0.16);
    color: var(--yellow);
    border: 1px solid rgba(255, 204, 0, 0.38);
}

.cart-qty-value {
    min-width: 22px;
    text-align: center;
    color: #ffffff;
    font-weight: bold;
}

.cart-remove-btn {
    background: rgba(255, 90, 90, 0.14);
    color: #ff8a8a;
    padding: 8px 10px;
    border: 1px solid rgba(255, 90, 90, 0.28);
}

.cart-total-box {
    margin-top: 18px;
    padding: 15px;
    background: rgba(255, 204, 0, 0.10);
    border: 1px solid rgba(255, 204, 0, 0.26);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total-box span {
    color: var(--yellow-soft);
    font-weight: bold;
}

.cart-total-box strong {
    color: var(--yellow);
    font-size: 22px;
}

.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.btn-secondary-cart {
    width: 100%;
    margin-top: 12px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.16);
    padding: 13px;
    border-radius: 11px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.btn-secondary-cart:hover {
    background: rgba(255,255,255,0.13);
}

.cart-toast {
    position: fixed;
    right: 22px;
    bottom: 84px;
    z-index: 10002;
    background: #111;
    color: var(--yellow);
    border: 1px solid rgba(255, 204, 0, 0.45);
    border-radius: 14px;
    padding: 12px 15px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.55);
    font-weight: bold;
    animation: cartToastIn 0.2s ease;
}

@keyframes cartToastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.purchase-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchase-product-item {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.purchase-product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.purchase-total {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 204, 0, 0.28);
    color: var(--yellow);
    font-size: 17px;
    font-weight: bold;
}

/* RESPONSIVE CARRITO */
@media (max-width: 700px) {
    .cart-floating-button {
        right: 14px;
        bottom: 14px;
        padding: 12px 15px;
    }

    .cart-modal {
        padding: 9px;
    }

    .cart-modal-content {
        padding: 16px;
        border-radius: 15px;
    }

    .cart-item {
        grid-template-columns: 68px 1fr;
    }

    .cart-item img {
        width: 68px;
        height: 68px;
    }

    .cart-item-controls {
        grid-column: span 2;
        justify-content: flex-end;
    }

    .cart-actions {
        grid-template-columns: 1fr;
    }
}

/* BOTÓN GUÍA DE TALLAS */
.btn-size-guide {
    width: 100%;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--yellow-soft);
    border: 1px solid rgba(255, 204, 0, 0.32);
    padding: 12px;
    border-radius: 11px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.btn-size-guide:hover {
    background: rgba(255, 204, 0, 0.12);
    border-color: rgba(255, 204, 0, 0.55);
    transform: translateY(-1px);
}

/* MODAL GUÍA DE TALLAS */
.size-guide-modal {
    display: none;
    position: fixed;
    z-index: 25000;
    inset: 0;
    overflow: auto;
    background:
        radial-gradient(circle at top, rgba(255, 204, 0, 0.12), transparent 35%),
        rgba(0,0,0,0.92);
    padding: 22px;
}

.size-guide-content {
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: 980px;
    margin: 4px auto;
    padding: 4px;
    position: relative;
    box-shadow: none;
}

.size-guide-content h2 {
    color: var(--yellow);
    margin: 0 0 6px;
    font-size: 25px;
}

.size-guide-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 38px 18px 0;
    line-height: 1.45;
}

.close-size-guide-modal {
    position: absolute;
    top: 12px;
    right: 18px;
    color: var(--yellow);
    font-size: 34px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.size-guide-image {
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

/* RESPONSIVE GUÍA DE TALLAS */
@media (max-width: 700px) {
    .size-guide-modal {
        padding: 4px;
    }

    .size-guide-content {
        margin: 4px auto;
        padding: 8px;
        border-radius: 14px;
    }

    .size-guide-content h2 {
        font-size: 20px;
    }

    .size-guide-content p {
        margin-right: 30px;
        margin-bottom: 8px;
        font-size: 12px;
    }

    .size-guide-image {
        max-height: 86vh;
    }
}

/* MENSAJE TIPO DE PAGO */
.payment-card-message {
    display: none;
    background: rgba(255, 204, 0, 0.10);
    border: 1px solid rgba(255, 204, 0, 0.28);
    color: #ffe680;
    border-radius: 13px;
    padding: 11px 12px;
    font-size: 13px;
    line-height: 1.45;
    margin-top: 2px;
}

.payment-card-message.show {
    display: block;
}