/* Flor y Estilo - Cart Shopify Style */

/* Hide theme wrapper */
.woocommerce-cart .section { padding: 0; }
.woocommerce-cart .container { max-width: 100%; padding: 0; }
.woocommerce-cart article > h1 { display: none; }
.woocommerce-cart .entry-content { margin: 0; }

/* ============ CART HEADER ============ */
.fsd-cart {
    font-family: 'Nunito Sans', -apple-system, sans-serif;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}
.fsd-cart-header {
    padding: 40px 0 24px;
    border-bottom: 1px solid #E8E6E3;
}
.fsd-cart-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: #333;
}
.fsd-cart-count {
    font-weight: 400;
    color: #999;
    font-size: 1rem;
}

/* ============ LAYOUT ============ */
.fsd-cart-layout {
    display: flex;
    gap: 40px;
    padding: 30px 0 60px;
    align-items: flex-start;
}
.fsd-cart-items {
    flex: 1;
    min-width: 0;
}
.fsd-cart-summary {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

/* ============ CART ITEMS ============ */
.fsd-cart-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid #E8E6E3;
    align-items: flex-start;
}

/* Image */
.fsd-cart-item-image {
    width: 120px;
    flex-shrink: 0;
}
.fsd-cart-item-image a {
    display: block;
}
.fsd-cart-item-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
    border: 1px solid #E8E6E3;
}

/* Details */
.fsd-cart-item-details {
    flex: 1;
    min-width: 0;
}
.fsd-cart-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    line-height: 1.4;
}
.fsd-cart-item-name:hover {
    color: #DC2698;
}
.fsd-cart-item-price-line {
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}
.fsd-cart-item-price-line del {
    color: #999;
    font-weight: 400;
    font-size: 0.88rem;
}
.fsd-cart-item-price-line ins {
    text-decoration: none;
}

/* Variations */
.fsd-cart-item-variations {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.fsd-cart-variation-row {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    gap: 6px;
}
.fsd-variation-label {
    color: #999;
}
.fsd-variation-value {
    font-weight: 600;
    color: #333;
}

/* Meta (other item data) */
.fsd-cart-item-meta {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.6;
}
.fsd-cart-item-meta dt { display: inline; font-weight: 600; }
.fsd-cart-item-meta dd { display: inline; margin: 0; }
.fsd-cart-item-meta p { margin: 0; }
.fsd-cart-item-meta .variation { margin: 0; }
.fsd-cart-item-meta .variation dt,
.fsd-cart-item-meta .variation dd { display: inline; }

/* Delivery info */
.fsd-cart-item-delivery {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #DC2698;
    background: #FDF2F5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 600;
}
.fsd-delivery-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.fsd-delivery-slot-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: #DC2698;
}

/* No delivery warning */
.fsd-cart-item-no-delivery {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: #999;
    background: #f9f9f9;
    border-left: 3px solid #ddd;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============ QUANTITY & ACTIONS ============ */
.fsd-cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

/* Quantity control */
.fsd-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #E8E6E3;
}
.fsd-qty-btn {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
}
.fsd-qty-btn:hover {
    background: #f5f5f5;
    color: #DC2698;
}
.fsd-qty-input {
    width: 44px;
    height: 36px;
    border: none;
    border-left: 1px solid #E8E6E3;
    border-right: 1px solid #E8E6E3;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    -moz-appearance: textfield;
    outline: none;
    color: #333;
}
.fsd-qty-input::-webkit-inner-spin-button,
.fsd-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove button */
.fsd-cart-item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #999;
    transition: color 0.15s;
}
.fsd-cart-item-remove:hover {
    color: #dc3545;
}
.fsd-cart-item-remove svg {
    width: 18px;
    height: 18px;
}

/* Update cart button */
.fsd-update-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border: none;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s;
}
.fsd-update-cart-btn:hover { background: #DC2698; }
.fsd-update-cart-btn:disabled, .fsd-update-cart-btn[disabled] {
    opacity: 0.4; cursor: default; background: #999;
}
.fsd-update-cart-btn.fsd-update-active {
    background: #DC2698 !important; opacity: 1 !important; cursor: pointer !important;
}

/* Continue shopping */
.fsd-continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: color 0.15s;
}
.fsd-continue-shopping:hover {
    color: #DC2698;
}
.fsd-continue-shopping svg {
    width: 16px;
    height: 16px;
}

/* ============ SUMMARY ============ */
.fsd-cart-summary-inner {
    background: #FAFAF8;
    border: 1px solid #E8E6E3;
    padding: 28px;
}
.fsd-summary-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #E8E6E3;
    color: #333;
}
.fsd-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    font-size: 0.88rem;
    color: #666;
}
.fsd-summary-row span:last-child {
    font-weight: 600;
    color: #333;
}
.fsd-summary-note {
    padding: 12px 0;
    border-top: 1px solid #E8E6E3;
}
.fsd-summary-note small {
    font-size: 0.78rem;
    color: #999;
    line-height: 1.5;
}
.fsd-summary-total {
    padding: 16px 0 4px;
    border-top: 1px solid #E8E6E3;
    font-size: 1.1rem !important;
}
.fsd-summary-total span {
    font-weight: 700 !important;
    color: #333 !important;
    font-size: 1.1rem;
}

/* Checkout button */
.fsd-summary-actions {
    margin-top: 20px;
}
.fsd-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: #DC2698;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Nunito Sans', sans-serif;
}
.fsd-checkout-btn:hover {
    background: #c41f84;
    color: #fff;
}
.fsd-checkout-btn.fsd-btn-disabled {
    background: #ccc;
    cursor: not-allowed;
}
.fsd-checkout-btn.fsd-btn-disabled:hover {
    background: #bbb;
}
.fsd-delivery-required {
    text-align: center;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff3cd;
    color: #856404;
    font-size: 13px;
    font-weight: 600;
    border-left: 3px solid #ffc107;
}

/* Delivery calendar in cart sidebar */
.fsd-cart-delivery-section {
    padding-bottom: 16px;
    border-bottom: 1px solid #E8E6E3;
    margin-bottom: 16px;
}
.fsd-cart-calendar {
    background: #fff;
    border: 1px solid #E8E6E3;
    padding: 14px;
}
.fsd-cart-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.fsd-cart-cal-btn {
    width: 28px; height: 28px;
    background: none; border: 1px solid #E8E6E3;
    cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #333; transition: all 0.15s;
}
.fsd-cart-cal-btn:hover { border-color: #DC2698; color: #DC2698; }
.fsd-cart-cal-month {
    font-size: 0.82rem; font-weight: 700; text-transform: capitalize;
}
.fsd-cart-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}
.fsd-cart-cal-grid .fsd-ch {
    text-align: center; font-size: 0.6rem; font-weight: 700;
    color: #999; text-transform: uppercase; padding: 4px 0;
}
.fsd-cart-cal-grid .fsd-cd {
    text-align: center; padding: 6px 2px;
    font-size: 0.75rem; cursor: pointer;
    transition: all 0.12s; border: 1px solid transparent;
}
.fsd-cart-cal-grid .fsd-cd:hover:not(.fsd-cd-off):not(.fsd-cd-empty) {
    background: #FDF2F5; border-color: #DC2698;
}
.fsd-cart-cal-grid .fsd-cd.fsd-cd-sel {
    background: #DC2698; color: #fff; font-weight: 700;
}
.fsd-cart-cal-grid .fsd-cd.fsd-cd-off {
    color: #ddd; cursor: default;
}
.fsd-cart-cal-grid .fsd-cd.fsd-cd-empty { cursor: default; }
.fsd-cart-cal-grid .fsd-cd.fsd-cd-today {
    position: relative;
}
.fsd-cart-cal-grid .fsd-cd.fsd-cd-today::after {
    content: ''; position: absolute; bottom: 2px;
    left: 50%; transform: translateX(-50%);
    width: 3px; height: 3px; background: #DC2698;
}

/* Slot picker in cart */
.fsd-cart-slot-picker { margin-top: 10px; }
.fsd-cart-slot-buttons {
    display: flex; flex-direction: column; gap: 6px;
}
.fsd-cart-slot-btn {
    padding: 8px 12px; border: 1px solid #E8E6E3;
    background: #fff; cursor: pointer;
    font-size: 0.75rem; font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    color: #333; transition: all 0.12s; text-align: center;
}
.fsd-cart-slot-btn:hover:not(.fsd-cart-slot-off) {
    border-color: #DC2698; color: #DC2698;
}
.fsd-cart-slot-btn.fsd-cart-slot-sel {
    background: #DC2698; color: #fff; border-color: #DC2698;
}
.fsd-cart-slot-btn.fsd-cart-slot-off {
    color: #ccc; cursor: default; background: #f9f9f9;
}

/* Selected delivery confirmation */
.fsd-cart-delivery-selected {
    margin-top: 10px; padding: 8px 12px;
    background: #FDF2F5; font-size: 0.78rem;
    color: #DC2698; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}

/* Notes */
.fsd-cart-notes { margin-bottom: 16px; }
.fsd-details summary {
    font-size: 0.82rem; font-weight: 600; color: #666; cursor: pointer; list-style: none;
    padding: 10px 0; border-bottom: 1px solid #E8E6E3;
}
.fsd-details summary::-webkit-details-marker { display: none; }
.fsd-details summary::before { content: '+ '; color: #DC2698; }
.fsd-details[open] summary::before { content: '− '; }
.fsd-notes-input {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd; font-family: inherit;
    font-size: 0.85rem; resize: vertical; min-height: 60px; outline: none; margin-top: 10px;
}
.fsd-notes-input:focus { border-color: #DC2698; }

/* Comuna Selector */
.fsd-cart-comuna-section {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid #E8E6E3;
}
.fsd-section-label {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.85rem; font-weight: 700; margin: 0 0 10px;
    display: flex; align-items: center; gap: 8px; color: #333;
}
.fsd-cart-select {
    width: 100%; padding: 12px 14px; border: 1px solid #ddd; font-family: inherit;
    font-size: 0.85rem; color: #333; outline: none; -webkit-appearance: none;
    background: #fff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") calc(100% - 12px) center / 10px no-repeat;
    padding-right: 32px;
}
.fsd-cart-select:focus { border-color: #DC2698; box-shadow: 0 0 0 1px #DC2698; }
.fsd-shipping-price {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: 10px; padding: 8px 0; font-size: 0.88rem; color: #666;
}
.fsd-shipping-price span:last-child { font-weight: 600; color: #333; }

/* Document Type */
.fsd-cart-doc-section {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid #E8E6E3;
}
.fsd-doc-options {
    display: flex; gap: 10px; margin-bottom: 12px;
}
.fsd-doc-option {
    flex: 1; display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border: 1px solid #ddd; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; transition: border-color 0.15s;
}
.fsd-doc-option:hover { border-color: #DC2698; }
.fsd-doc-option input[type="radio"] { accent-color: #DC2698; margin: 0; }
.fsd-doc-option input[type="radio"]:checked + span { color: #DC2698; }
.fsd-factura-fields { display: flex; flex-direction: column; gap: 8px; }
.fsd-cart-input {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd; font-family: inherit;
    font-size: 0.85rem; outline: none;
}
.fsd-cart-input:focus { border-color: #DC2698; }

/* Continue shopping in aside */
.fsd-continue-shopping--aside {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid #E8E6E3;
    font-size: 0.82rem; font-weight: 600; color: #666; text-decoration: none;
}
.fsd-continue-shopping--aside:hover { color: #DC2698; }
.fsd-continue-shopping--aside svg { width: 14px; height: 14px; }

/* Coupon */
.fsd-coupon-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #E8E6E3;
}
.fsd-coupon-details summary {
    font-size: 0.82rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    list-style: none;
}
.fsd-coupon-details summary::-webkit-details-marker { display: none; }
.fsd-coupon-details summary::before {
    content: '+ ';
    color: #DC2698;
}
.fsd-coupon-details[open] summary::before { content: '− '; }
.fsd-coupon-form {
    display: flex;
    gap: 0;
    margin-top: 10px;
}
.fsd-coupon-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-right: none;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}
.fsd-coupon-input:focus { border-color: #DC2698; }
.fsd-coupon-btn {
    padding: 10px 18px;
    background: #333;
    color: #fff;
    border: none;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.fsd-coupon-btn:hover { background: #DC2698; }

/* ============ HIDE WC SHIPPING ROW & CALCULATOR ============ */
.woocommerce-shipping-totals,
.shipping,
tr.shipping { display: none !important; }
.woocommerce-cart .shipping-calculator-form,
.woocommerce-cart .woocommerce-shipping-calculator,
.woocommerce-cart .shipping-calculator-button,
.woocommerce-cart .cart-collaterals,
.woocommerce-cart .cart_totals {
    display: none !important;
}

/* ============ EMPTY CART ============ */
.woocommerce-cart .woocommerce-notices-wrapper,
.woocommerce-cart .cart-empty,
.woocommerce-cart .return-to-shop {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}
.woocommerce-cart .cart-empty {
    text-align: center;
    padding-top: 60px;
    padding-bottom: 20px;
    font-size: 1rem;
    color: #666;
}
.woocommerce-cart .return-to-shop {
    text-align: center;
    padding-bottom: 60px;
}
.woocommerce-cart .return-to-shop a {
    display: inline-flex;
    padding: 14px 32px;
    background: #DC2698;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s;
}
.woocommerce-cart .return-to-shop a:hover { background: #c41f84; }
/* Undo notice */
.woocommerce-cart .woocommerce-message {
    max-width: 1280px;
    margin: 20px auto !important;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .fsd-cart { padding: 0 20px; }
    .fsd-cart-header { padding: 24px 0 16px; }
    .fsd-cart-title { font-size: 1.3rem; }
    .fsd-cart-layout {
        flex-direction: column;
        gap: 24px;
    }
    .fsd-cart-summary {
        width: 100%;
        position: static;
    }
    .fsd-cart-item-image { width: 90px; }
    .fsd-cart-item-image img { width: 90px; height: 90px; }
    .fsd-cart-item { gap: 14px; padding: 18px 0; }
}
@media (max-width: 480px) {
    .fsd-cart { padding: 0 14px; }
    .fsd-cart-item { flex-wrap: wrap; gap: 10px; }
    .fsd-cart-item-image { width: 70px; }
    .fsd-cart-item-image img { width: 70px; height: 70px; }
    .fsd-cart-item-info { font-size: 0.85rem; }
    .fsd-cart-item-name { font-size: 0.9rem; }
    .fsd-cart-item-actions {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    .fsd-section-label { font-size: 0.85rem; }
    .fsd-cart-cal-grid { font-size: 0.75rem; }
    .fsd-input, .fsd-select { font-size: 16px; }
}
