/**
 * Vianke Shop Public Styles
 * @copyright 2026 Vianke Ltd
 */

.vianke-shop-listing, .vianke-single-product-page, .vianke-checkout-page { max-width: 1200px; margin: 0 auto; padding: 20px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.vianke-btn { display: inline-block; padding: 12px 24px; border-radius: 6px; font-size: 15px; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; border: none; transition: all 0.3s ease; }
.vianke-btn-primary { background: #2563eb; color: #fff; }
.vianke-btn-primary:hover { background: #1d4ed8; color: #fff; }
.vianke-btn-secondary { background: #f3f4f6; color: #374151; }
.vianke-btn-secondary:hover { background: #e5e7eb; }
.vianke-btn-order { background: #059669; color: #fff; font-size: 18px; padding: 16px 32px; width: 100%; }
.vianke-btn-order:hover { background: #047857; color: #fff; }
.vianke-btn-full { width: 100%; }

/* PRODUKTLISTA */
.vianke-products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.vianke-shop-listing[data-columns="2"] .vianke-products-grid { grid-template-columns: repeat(2, 1fr); }
.vianke-shop-listing[data-columns="4"] .vianke-products-grid { grid-template-columns: repeat(4, 1fr); }

.vianke-product-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.vianke-product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.vianke-product-card.vianke-expired { opacity: 0.7; }
.vianke-product-link { text-decoration: none; color: inherit; }
.vianke-product-card .vianke-product-image { position: relative; padding-top: 100%; background: #f3f4f6; overflow: hidden; }
.vianke-product-card .vianke-product-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.vianke-product-card:hover .vianke-product-image img { transform: scale(1.05); }
.vianke-expired-badge { position: absolute; top: 10px; right: 10px; background: #dc2626; color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.vianke-product-card .vianke-product-info { padding: 20px; flex-grow: 1; }
.vianke-product-card .vianke-product-title { margin: 0 0 10px; font-size: 18px; font-weight: 600; color: #1f2937; }
.vianke-product-card .vianke-product-price { font-size: 22px; font-weight: 700; color: #059669; }
.vianke-product-card .vianke-btn { margin: 0 20px 20px; }
.vianke-no-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #9ca3af; background: #f3f4f6; }

/* PRODUKTSIDA */
.vianke-back-link { display: inline-block; margin-bottom: 20px; color: #6b7280; text-decoration: none; font-size: 14px; }
.vianke-back-link:hover { color: #2563eb; }
.vianke-product-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.vianke-product-gallery { position: sticky; top: 20px; }
.vianke-main-image { border-radius: 12px; overflow: hidden; background: #f3f4f6; margin-bottom: 15px; }
.vianke-main-image img { width: 100%; height: auto; display: block; }
.vianke-gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.vianke-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s; }
.vianke-thumb:hover, .vianke-thumb.active { border-color: #2563eb; }

.vianke-product-details .vianke-product-title { margin: 0 0 15px; font-size: 32px; font-weight: 700; color: #1f2937; }
.vianke-product-price-large { font-size: 36px; font-weight: 700; color: #059669; margin-bottom: 25px; }
.vianke-product-description { font-size: 16px; line-height: 1.7; color: #4b5563; margin-bottom: 30px; }
.vianke-product-description p:last-child { margin-bottom: 0; }

/* NEDRÄKNING */
.vianke-deadline-section { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-radius: 12px; padding: 20px; margin-bottom: 25px; }
.vianke-deadline-section.expired { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); }
.vianke-countdown-label { font-size: 14px; font-weight: 600; color: #92400e; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.vianke-countdown { display: flex; gap: 15px; }
.vianke-cd-item { background: #fff; border-radius: 8px; padding: 12px 16px; text-align: center; min-width: 70px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.vianke-cd-num { display: block; font-size: 28px; font-weight: 700; color: #1f2937; line-height: 1; }
.vianke-cd-txt { display: block; font-size: 11px; color: #6b7280; margin-top: 4px; text-transform: uppercase; }
.vianke-deadline-expired { font-size: 18px; font-weight: 600; color: #991b1b; }

/* PROGRESS BAR */
.vianke-order-progress { background: #f3f4f6; border-radius: 12px; padding: 20px; margin-bottom: 25px; }
.vianke-progress-label { font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 10px; }
.vianke-progress-bar { height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.vianke-progress-fill { height: 100%; background: linear-gradient(90deg, #059669, #10b981); border-radius: 6px; transition: width 0.5s ease; }
.vianke-progress-success { color: #059669; font-weight: 600; margin-top: 10px; }
.vianke-progress-remaining { color: #6b7280; font-size: 13px; margin-top: 10px; }
.vianke-delivery-info { background: #eff6ff; border-radius: 8px; padding: 15px; margin-bottom: 25px; color: #1e40af; }

/* STORLEKAR */
.vianke-size-selector { margin-bottom: 25px; }
.vianke-size-selector label { display: block; font-weight: 600; margin-bottom: 10px; color: #374151; }
.vianke-sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.vianke-size-option { cursor: pointer; }
.vianke-size-option input { display: none; }
.vianke-size-option span { display: block; padding: 12px 20px; border: 2px solid #e5e7eb; border-radius: 8px; font-weight: 600; transition: all 0.2s; }
.vianke-size-option:hover span { border-color: #2563eb; }
.vianke-size-option input:checked + span { background: #2563eb; border-color: #2563eb; color: #fff; }

/* KVANTITET */
.vianke-quantity-selector { margin-bottom: 25px; }
.vianke-quantity-selector > label { display: block; font-weight: 600; margin-bottom: 10px; color: #374151; }
.vianke-qty-wrapper { display: inline-flex; align-items: center; border: 2px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.vianke-qty-btn { width: 44px; height: 44px; border: none; background: #f3f4f6; font-size: 20px; cursor: pointer; transition: background 0.2s; }
.vianke-qty-btn:hover { background: #e5e7eb; }
.vianke-qty-input { width: 60px; height: 44px; border: none; text-align: center; font-size: 18px; font-weight: 600; }
.vianke-qty-input:focus { outline: none; }
.vianke-expired-message { background: #fee2e2; color: #991b1b; padding: 20px; border-radius: 8px; text-align: center; }

/* VARUKORG PANEL */
.vianke-cart-panel { position: fixed; top: 0; right: -400px; width: 400px; height: 100vh; background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,0.15); z-index: 99999; display: flex; flex-direction: column; transition: right 0.3s ease; }
.vianke-cart-panel.open { right: 0; }
.vianke-cart-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #e5e7eb; }
.vianke-cart-header h3 { margin: 0; font-size: 20px; }
#vianke-cart-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #6b7280; line-height: 1; }
.vianke-cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.vianke-cart-empty-msg { text-align: center; color: #9ca3af; padding: 40px 0; }
.vianke-cart-item { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #f3f4f6; }
.vianke-cart-item-img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.vianke-cart-item-info { flex: 1; }
.vianke-cart-item-name { font-weight: 600; color: #1f2937; margin-bottom: 4px; }
.vianke-cart-item-size { font-size: 13px; color: #6b7280; }
.vianke-cart-item-qty { font-size: 13px; color: #6b7280; }
.vianke-cart-item-total { font-weight: 600; color: #059669; }
.vianke-cart-item-remove { background: none; border: none; font-size: 20px; color: #9ca3af; cursor: pointer; padding: 5px; }
.vianke-cart-item-remove:hover { color: #dc2626; }
.vianke-cart-footer { padding: 20px; border-top: 1px solid #e5e7eb; background: #f9fafb; }
.vianke-cart-total-row { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 20px; }
#vianke-cart-total { color: #059669; }
.vianke-cart-btns { display: flex; gap: 10px; }
.vianke-cart-btns .vianke-btn { flex: 1; text-align: center; }
.vianke-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99998; display: none; }
.vianke-overlay.open { display: block; }

/* KASSA */
.vianke-checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }
.vianke-checkout-summary { background: #f9fafb; border-radius: 12px; padding: 30px; }
.vianke-checkout-summary h3 { margin: 0 0 20px; font-size: 20px; }
.vianke-checkout-items { margin-bottom: 20px; }
.vianke-checkout-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e5e7eb; font-size: 15px; }
.vianke-checkout-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; padding-top: 15px; border-top: 2px solid #e5e7eb; }
.vianke-checkout-total span:last-child { color: #059669; }
.vianke-payment-box { background: #eff6ff; border-radius: 8px; padding: 20px; margin-top: 25px; }
.vianke-payment-box h4 { margin: 0 0 10px; color: #1e40af; }
.vianke-payment-box p { margin: 5px 0; }
.vianke-payment-instructions { background: #fef3c7; border-radius: 8px; padding: 20px; margin-top: 20px; color: #92400e; font-size: 14px; line-height: 1.6; }
.vianke-checkout-form-wrap h3 { margin: 0 0 20px; font-size: 20px; }
.vianke-form-field { margin-bottom: 20px; }
.vianke-form-field label { display: block; font-weight: 600; margin-bottom: 8px; color: #374151; }
.vianke-form-field .required { color: #dc2626; }
.vianke-form-field input, .vianke-form-field textarea { width: 100%; padding: 14px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 16px; font-family: inherit; transition: border-color 0.2s; box-sizing: border-box; }
.vianke-form-field input:focus, .vianke-form-field textarea:focus { outline: none; border-color: #2563eb; }
.vianke-message { margin-top: 20px; padding: 15px; border-radius: 8px; text-align: center; display: none; }
.vianke-message.success { display: block; background: #d1fae5; color: #065f46; }
.vianke-message.error { display: block; background: #fee2e2; color: #991b1b; }
.vianke-cart-empty { text-align: center; padding: 60px 20px; }
.vianke-cart-empty p { font-size: 18px; color: #6b7280; margin-bottom: 20px; }

/* RESPONSIVE */
@media (max-width: 968px) {
    .vianke-product-container, .vianke-checkout-grid { grid-template-columns: 1fr; gap: 30px; }
    .vianke-product-gallery { position: static; }
}
@media (max-width: 768px) {
    .vianke-products-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .vianke-product-details .vianke-product-title { font-size: 24px; }
    .vianke-product-price-large { font-size: 28px; }
    .vianke-cart-panel { width: 100%; right: -100%; }
    .vianke-countdown { flex-wrap: wrap; }
    .vianke-cd-item { min-width: 60px; padding: 10px 12px; }
    .vianke-cd-num { font-size: 22px; }
}
@media (max-width: 480px) {
    .vianke-products-grid { grid-template-columns: 1fr; }
    .vianke-sizes { gap: 8px; }
    .vianke-size-option span { padding: 10px 14px; font-size: 14px; }
}
