/* Fit & Flex Commerce Styles v2.0.0 */

/* Product Grid */
.ff-products-grid { display:grid; gap:20px; }
.ff-cols-2 { grid-template-columns:repeat(2,1fr); }
.ff-cols-3 { grid-template-columns:repeat(3,1fr); }
.ff-cols-4 { grid-template-columns:repeat(4,1fr); }
@media(max-width:768px) { .ff-products-grid { grid-template-columns:1fr !important; } }

.ff-product-card { border:1px solid #e0e0e0; border-radius:8px; padding:15px; text-align:center; transition:box-shadow .2s; }
.ff-product-card:hover { box-shadow:0 2px 12px rgba(0,0,0,.08); }
.ff-product-card img { max-width:100%; height:auto; border-radius:6px; }
.ff-product-title { margin:10px 0 5px; font-size:1.1em; }
.ff-product-title a { text-decoration:none; color:inherit; }
.ff-product-price { font-size:1.2em; font-weight:600; color:#27ae60; margin:5px 0 12px; display:block; }
.ff-product-price del { color:#999; font-weight:400; font-size:.9em; }
.ff-product-price ins { text-decoration:none; }

/* Cart Page */
.ff-cart-page { max-width:900px; }
.ff-cart-table { width:100%; border-collapse:collapse; margin-bottom:20px; }
.ff-cart-table th, .ff-cart-table td { padding:10px 8px; border-bottom:1px solid #eee; text-align:left; vertical-align:middle; }
.ff-cart-table thead th { font-weight:600; border-bottom:2px solid #ddd; }
.ff-cart-thumb img { border-radius:4px; }
.ff-cart-qty-input { width:60px; padding:4px 6px; border:1px solid #ccc; border-radius:4px; text-align:center; }
.ff-cart-remove { background:none; border:none; color:#e74c3c; font-size:1.4em; cursor:pointer; padding:0 6px; }
.ff-cart-remove:hover { color:#c0392b; }

.ff-cart-footer { display:flex; flex-wrap:wrap; gap:20px; justify-content:space-between; align-items:flex-start; }
.ff-cart-voucher { flex:1; min-width:250px; }
.ff-cart-voucher input { padding:8px 10px; border:1px solid #ccc; border-radius:4px; width:180px; }
.ff-cart-totals { min-width:280px; }
.ff-cart-totals table { width:100%; }
.ff-cart-totals th, .ff-cart-totals td { padding:6px 0; }
.ff-total-row { font-size:1.15em; }

/* Mini Cart */
.ff-mini-cart { position:relative; display:inline-block; }
.ff-mini-cart-toggle { cursor:pointer; position:relative; font-size:1.3em; padding:6px 12px; }
.ff-cart-count { position:absolute; top:-4px; right:-4px; background:#e74c3c; color:#fff; font-size:.7em; border-radius:50%; width:18px; height:18px; line-height:18px; text-align:center; }
.ff-mini-cart-dropdown { position:absolute; right:0; top:100%; background:#fff; border:1px solid #ddd; border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.1); min-width:320px; padding:15px; z-index:9999; }
.ff-mini-cart-items { list-style:none; margin:0; padding:0; }
.ff-mini-cart-item { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid #f0f0f0; }
.ff-mini-cart-name { flex:1; font-size:.9em; }
.ff-mini-cart-remove { background:none; border:none; color:#e74c3c; cursor:pointer; font-size:1.1em; }
.ff-mini-cart-total { padding:10px 0 8px; font-size:1.05em; }
.ff-mini-cart-actions { display:flex; gap:8px; }
.ff-mini-cart-actions a { flex:1; text-align:center; }

/* Checkout */
.ff-checkout-wrap { max-width:1000px; }
.ff-checkout-columns { display:flex; gap:30px; flex-wrap:wrap; }
.ff-checkout-billing { flex:1; min-width:300px; }
.ff-checkout-order { flex:1; min-width:300px; }
.ff-field { margin-bottom:12px; }
.ff-field label { display:block; font-weight:500; margin-bottom:4px; font-size:.9em; }
.ff-field input, .ff-field select, .ff-field textarea { width:100%; padding:8px 10px; border:1px solid #ccc; border-radius:4px; font-size:.95em; }
.ff-field-row--half { display:flex; gap:12px; }
.ff-field-row--half .ff-field { flex:1; }
.ff-checkout-order-table { width:100%; border-collapse:collapse; margin-bottom:15px; }
.ff-checkout-order-table th, .ff-checkout-order-table td { padding:8px 6px; border-bottom:1px solid #eee; }
.ff-checkout-order-table thead th { font-weight:600; border-bottom:2px solid #ddd; }
.ff-checkout-order-table tfoot th { text-align:left; }
.ff-discount-row td { color:#27ae60; }

.ff-payment-methods { margin-bottom:20px; }
.ff-payment-method { padding:10px 12px; border:1px solid #e0e0e0; border-radius:6px; margin-bottom:8px; }
.ff-payment-method label { font-weight:500; cursor:pointer; }
.ff-payment-desc { font-size:.85em; color:#666; margin-top:4px; }

.ff-place-order { margin-top:15px; }
.ff-checkout-spinner { display:inline-block; margin-left:10px; color:#888; }

/* Buttons */
.ff-btn-primary { background:#27ae60 !important; color:#fff !important; border:none !important; padding:10px 24px !important; border-radius:6px !important; font-size:1em !important; cursor:pointer; }
.ff-btn-primary:hover { background:#219a52 !important; }
.ff-btn-danger { background:#e74c3c !important; color:#fff !important; border:none !important; }
.ff-btn-danger:hover { background:#c0392b !important; }
.ff-btn-small { font-size:.85em !important; padding:4px 10px !important; }

/* Account */
.ff-account-wrap { max-width:900px; }
.ff-account-nav ul { display:flex; flex-wrap:wrap; list-style:none; margin:0 0 20px; padding:0; gap:2px; border-bottom:2px solid #eee; }
.ff-account-nav li a { display:block; padding:8px 16px; text-decoration:none; color:#555; font-size:.95em; border-bottom:2px solid transparent; margin-bottom:-2px; }
.ff-account-nav li.active a, .ff-account-nav li a:hover { color:#27ae60; border-bottom-color:#27ae60; }

.ff-dashboard-cards { display:flex; gap:20px; flex-wrap:wrap; margin-top:15px; }
.ff-card { flex:1; min-width:250px; border:1px solid #e0e0e0; border-radius:8px; padding:20px; }
.ff-card h4 { margin:0 0 8px; color:#555; font-size:.9em; text-transform:uppercase; letter-spacing:.5px; }
.ff-big-number { font-size:2.4em; font-weight:700; color:#27ae60; }

.ff-table { width:100%; border-collapse:collapse; }
.ff-table th, .ff-table td { padding:8px 10px; text-align:left; border-bottom:1px solid #eee; }
.ff-table thead th { font-weight:600; border-bottom:2px solid #ddd; }

.ff-status { display:inline-block; padding:2px 10px; border-radius:12px; font-size:.8em; font-weight:500; }
.ff-status-completed, .ff-status-active, .ff-status-booked { background:#d4edda; color:#155724; }
.ff-status-pending, .ff-status-processing { background:#fff3cd; color:#856404; }
.ff-status-cancelled, .ff-status-failed, .ff-status-refunded { background:#f8d7da; color:#721c24; }
.ff-status-on-hold, .ff-status-paused { background:#d1ecf1; color:#0c5460; }

/* Notices */
.ff-notice { padding:12px 16px; border-radius:6px; margin-bottom:15px; }
.ff-notice-success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.ff-notice-error { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }

/* Order Received */
.ff-order-received h2 { color:#27ae60; }
.ff-order-overview { margin:15px 0 25px; }
.ff-order-overview th { text-align:left; padding:6px 15px 6px 0; color:#555; }

/* Subscription Card */
.ff-subscription-card { border:1px solid #e0e0e0; border-radius:8px; padding:20px; margin-bottom:15px; }

/* Admin Product Editor */
.ff-product-data { background:#fff; border:1px solid #ccc; }
.ff-product-type-selector { padding:12px 16px; border-bottom:1px solid #eee; }
.ff-product-type-selector select { font-size:1em; padding:6px; }
.ff-product-tabs { display:flex; list-style:none; margin:0; padding:0; border-bottom:1px solid #e0e0e0; background:#f9f9f9; }
.ff-product-tabs li { margin:0; }
.ff-product-tabs a { display:block; padding:10px 16px; text-decoration:none; color:#555; border-bottom:2px solid transparent; }
.ff-product-tabs a.active { color:#0073aa; border-bottom-color:#0073aa; background:#fff; }
.ff-tab-panel { display:none; padding:16px; }
.ff-tab-panel.active { display:block; }

/* Responsive */
@media(max-width:600px) {
    .ff-checkout-columns { flex-direction:column; }
    .ff-field-row--half { flex-direction:column; gap:0; }
    .ff-cart-footer { flex-direction:column; }
    .ff-account-nav ul { flex-direction:column; }
    .ff-dashboard-cards { flex-direction:column; }
}

/* =========================================================================
   Cart Toast Notification
   ========================================================================= */
.ff-cart-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    background: #1d2327;
    color: #fff;
    padding: 14px 44px 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 420px;
    animation: ff-slide-in 0.3s ease-out;
}
@keyframes ff-slide-in {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.ff-cart-toast .dashicons { font-size: 20px; width: 20px; height: 20px; }
.ff-toast-links { display: flex; gap: 8px; margin-left: 6px; }
.ff-toast-btn {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.ff-toast-cart { background: #fff; color: #1d2327; }
.ff-toast-cart:hover { background: #f0f0f1; }
.ff-toast-checkout { background: #2271b1; color: #fff; }
.ff-toast-checkout:hover { background: #135e96; }
.ff-toast-close {
    position: absolute;
    top: 8px; right: 10px;
    background: none; border: none;
    color: rgba(255,255,255,0.6); font-size: 18px; cursor: pointer;
    line-height: 1;
}
.ff-toast-close:hover { color: #fff; }
@media (max-width: 500px) {
    .ff-cart-toast { bottom: 10px; right: 10px; left: 10px; max-width: none; }
}

/* =========================================================================
   Payment badges (Token / Cash)
   ========================================================================= */
.ff-pay-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
    margin-left: 6px;
}
.ff-pay-badge--token { background: #def7ec; color: #03543f; }
.ff-pay-badge--cash  { background: #e8f0fe; color: #1a56db; }

/* Token summary rows */
.ff-token-summary-row th,
.ff-token-summary-row td {
    color: #03543f;
    background: #f0fdf4;
}
.ff-cart-row-token .ff-cart-price,
.ff-cart-row-token .ff-cart-line,
.ff-checkout-row-token .ff-checkout-item-price {
    color: #03543f;
    font-weight: 600;
}

/* Email status warning */
.ff-email-status { display: block; margin-top: 4px; min-height: 20px; }
.ff-email-warn { color: #b45309; font-size: 13px; }
.ff-email-warn a { color: #1a56db; font-weight: 600; }

/* Guest notice */
.ff-guest-notice { margin-bottom: 16px; }

/* Login required box */
.ff-checkout-login-required {
    max-width: 500px;
    margin: 20px auto;
    text-align: center;
}
.ff-checkout-login-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}
