/**
 * Storefront UIkit Styles
 * Shop, Product, Cart, Checkout pages
 */

/* ========================================
   STORE HEADER ICONS
   ======================================== */
.store-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
}
.store-icon-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Sticky → iconos verdes sólidos */
.uk-sticky-below .store-icon-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}
.uk-sticky-below .store-icon-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

/* ========================================
   STOREFRONT HEADER: LIGHT sobre hero / DARK en sticky
   Fuerza estilos con alta especificidad
   ======================================== */
/* Sobre hero: todo blanco/light (opacity para transición suave) */
header.storefront-header .uk-navbar-toggle-icon svg > [class*="line-"] { stroke: #fff !important; }
header.storefront-header .hamburger-toggle { color: #fff !important; }
header.storefront-header .lang-toggle { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
header.storefront-header .logo-light { opacity: 1 !important; }
header.storefront-header .logo-default { opacity: 0 !important; }
header.storefront-header .uk-navbar-container { border-bottom: none !important; }

/* Sticky (scroll real): todo negro/dark */
header.storefront-header.uk-sticky-below .uk-navbar-toggle-icon svg > [class*="line-"] { stroke: #1D1D1B !important; }
header.storefront-header.uk-sticky-below .hamburger-toggle { color: #1D1D1B !important; }
header.storefront-header.uk-sticky-below .lang-toggle { color: #1D1D1B !important; text-shadow: none !important; }
header.storefront-header.uk-sticky-below .logo-light { opacity: 0 !important; }
header.storefront-header.uk-sticky-below .logo-default { opacity: 1 !important; }
header.storefront-header.uk-sticky-below .uk-navbar-container { border-bottom: 1px solid #000 !important; }
header.storefront-header.uk-sticky-below .store-icon-btn {
    background: var(--primary-color); border-color: var(--primary-color); color: var(--secondary-color);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   STORE HERO
   ======================================== */
.store-hero {
    position: relative;
    min-height: 450px;
}

.store-hero img {
    filter: brightness(0.4);
}

.store-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding-bottom: 60px;
}
.store-hero-overlay > .uk-container {
    width: 100%;
}

.store-hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff !important;
    line-height: 1.1;
    margin: 0 0 15px;
    text-align: left;
}
.store-hero-title span {
    color: var(--primary-color) !important;
}

.store-hero-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--white);
    max-width: 500px;
    line-height: 1.6;
    text-align: left;
}

/* ========================================
   SHOP PAGE
   ======================================== */
.shop-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin: 0 0 30px;
}

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.shop-search {
    border-radius: 25px !important;
    border: 1px solid var(--border-color) !important;
    padding: 8px 20px !important;
    font-size: 13px;
    min-width: 200px;
}

.shop-filter-btn {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    border-radius: 25px !important;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 20px !important;
    display: flex;
    align-items: center;
    gap: 5px;
}

.shop-filter-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.shop-filter-tabs a {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.shop-filter-tabs a:hover,
.shop-filter-tabs a.active {
    background: var(--primary-color);
    color: var(--white);
}

.shop-results-count {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Filter Dropdown */
.filter-dropdown {
    border-radius: 12px !important;
    padding: 20px !important;
    min-width: 250px;
}

.filter-dropdown h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 0 15px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-tag {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
}

.filter-tag.active,
.filter-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ========================================
   PRODUCT CARD (UIkit)
   ======================================== */
.product-card-uikit {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.product-card-uikit:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-card-img {
    border-radius: 12px;
    overflow: hidden;
}

.product-card-img img {
    transition: transform 0.5s ease;
}

.product-card-uikit:hover .product-card-img img {
    transform: scale(1.05);
}

.product-card-placeholder {
    height: 250px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    border-radius: 12px;
}

.product-card-img-link {
    text-decoration: none;
    display: block;
}

.product-card-body {
    padding: 15px 15px;
}

.product-card-name {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0 0 10px;
    line-height: 1.3;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card-price {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.product-add-btn {
    font-size: 11px !important;
    padding: 5px 15px !important;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   PRODUCT MODAL
   ======================================== */
.uk-modal-dialog.product-modal-dialog {
    max-width: 480px;
    border-radius: 16px;
    overflow: hidden;
    margin: auto 30px 30px auto;
    position: fixed;
    bottom: 0;
    right: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    border: none;
}

.product-modal-dialog .uk-modal-header {
    border-bottom: 1px solid #eee;
    padding: 16px 24px;
    background: #fff;
}
.product-modal-dialog .uk-modal-footer {
    border-top: 1px solid #eee;
    padding: 16px 24px;
    background: #fff;
}

.product-modal-dialog .uk-modal-body {
    padding: 20px 24px;
    max-height: 65vh;
    background: #fff;
}

.product-modal-dialog .uk-modal-close-default {
    top: 14px;
    right: 14px;
    color: var(--secondary-color);
}

.product-modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    color: var(--secondary-color);
}

.product-modal-img-wrapper {
    max-height: 260px;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 20px;
}
.product-modal-img-wrapper img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.product-modal-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 12px;
    color: var(--secondary-color);
    line-height: 1.3;
}

.product-modal-desc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #666;
    line-height: 1.7;
}
.product-modal-desc p {
    font-size: 0.85rem !important;
    color: #666 !important;
    margin-bottom: 8px;
}

.product-modal-price {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-color);
}

/* Footer: quantity + button */
.product-modal-dialog .uk-modal-footer .uk-button-default {
    border-radius: 8px;
    padding: 4px 10px;
    min-width: 32px;
    border-color: #ddd;
    color: var(--secondary-color);
}
.product-modal-dialog .uk-modal-footer .uk-input {
    border-radius: 8px;
    border-color: #ddd;
    height: 34px;
}
.product-modal-dialog .uk-modal-footer .uk-button-primary {
    flex: 1;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Modal backdrop blur */
.uk-modal.uk-open { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.uk-modal { background: rgba(0, 0, 0, 0.35); }

/* ========================================
   CART MODAL
   ======================================== */
.cart-modal-dialog {
    max-width: 450px;
    border-radius: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
}

.cart-item-sku {
    font-size: 11px;
    color: var(--text-color);
}

.cart-item-price {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ========================================
   CHECKOUT STEPS
   ======================================== */
.checkout-steps {
    padding: 40px 0 20px;
}

.checkout-steps-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.checkout-step.active {
    opacity: 1;
}

.checkout-step-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.3s;
}

.checkout-step.active .checkout-step-icon {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.checkout-step-label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
    text-align: center;
}

.checkout-step-line {
    width: 80px;
    height: 2px;
    background: var(--border-color);
    margin: 0 5px;
    margin-bottom: 30px;
    transition: background 0.3s;
}

.checkout-step-line.active {
    background: var(--primary-color);
}

/* ========================================
   CHECKOUT CARDS
   ======================================== */
.order-summary-card {
    border-radius: 12px !important;
}

.checkout-card {
    border-radius: 12px !important;
    overflow: hidden;
}

.checkout-card-header {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 12px 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
}

.checkout-card-body {
    padding: 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

/* Cart items in checkout */
.checkout-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.checkout-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 3px;
}

.checkout-item-sku {
    font-size: 11px;
    color: var(--primary-color);
}

.checkout-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-item-price {
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 60px;
    text-align: right;
}

/* Quantity Controls */
.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
}

.qty-control button {
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-control button:hover {
    background: #f5f5f5;
}

.qty-control span {
    font-size: 13px;
    font-weight: 600;
    min-width: 25px;
    text-align: center;
}

/* ========================================
   PAYMENT METHOD CARDS
   ======================================== */
.payment-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-card.active,
.payment-card:hover {
    border-color: var(--primary-color);
}

.payment-card.active .payment-card-header {
    background: var(--primary-color);
    color: var(--white);
    margin: -20px -20px 15px;
    padding: 12px 20px;
    border-radius: 10px 10px 0 0;
}

.payment-card-header {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 12px 20px;
    margin: -20px -20px 15px;
    border-radius: 10px 10px 0 0;
    background: #f5f5f5;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 959px) {
    .store-hero-title {
        font-size: 2rem;
    }

    .shop-title {
        font-size: 1.8rem;
    }

    .checkout-steps-wrapper {
        gap: 5px;
    }

    .checkout-step-label {
        font-size: 9px;
    }

    .checkout-step-line {
        width: 40px;
    }

    .store-icon-btn {
        width: 32px;
        height: 32px;
    }
}
