/**
 * Blanks Frontend Styles
 * assets/css/blanks-styles.css
 */

/* General Styles */
.blanks-shop-container,
.blanks-cart-container,
.blanks-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Shop Styles */
.blanks-shop-container {
    display: flex;
    gap: 30px;
}

/* Full width when no filters */
.blanks-shop-container.blanks-no-filters {
    display: block;
    max-width: 100%;
}

.blanks-shop-container.blanks-no-filters .blanks-products {
    width: 100%;
    max-width: 100%;
}

.blanks-shop-container.blanks-no-filters .blanks-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    max-width: 100%;
}

.blanks-filters {
    width: 250px;
    flex-shrink: 0;
}

.blanks-filter-section {
    margin-bottom: 30px;
}

.blanks-filter-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.blanks-filter-section h4 {
    margin: 10px 0 8px 0;
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

.blanks-filter-section label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.blanks-filter-section input[type="radio"],
.blanks-filter-section input[type="checkbox"] {
    margin-right: 8px;
}

/* Brand model sub-filters */
.blanks-brand-models {
    margin-left: 20px;
    padding-left: 10px;
    border-left: 2px solid #e0e0e0;
    display: none;
}

.blanks-brand-models.active {
    display: block;
}

.blanks-brand-models label {
    font-size: 13px;
    color: #555;
}

.blanks-model-filter {
    padding: 3px 0;
}

/* Apply Filters Button */
.blanks-apply-filters {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
}

.blanks-apply-filters:hover {
    background: #45a049;
}

.blanks-apply-filters:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.blanks-filter-count {
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
}

.blanks-products {
    flex: 1;
}

.blanks-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.blanks-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.blanks-product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.blanks-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.blanks-product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.blanks-product-card h3 {
    font-size: 18px;
    margin: 10px 0;
    color: #333;
}

.blanks-product-card p {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}

/* Modal Styles */
/* Modal Overlay */
.blanks-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.blanks-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    cursor: pointer;
}

.blanks-modal-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 5% auto;
    z-index: 10000;
    animation: fadeInUp 0.25s ease;
}

/* Close Button */
.blanks-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.blanks-modal-close:hover {
    color: #333;
}

/* Animation */
@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


.blanks-product-selector {
    margin-top: 20px;
}

/* Color Selector with Thumbnails */
.blanks-color-selector {
    margin: 20px 0;
}

.blanks-color-selector h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
}

.blanks-color-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
}

.blanks-color-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.blanks-color-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.blanks-color-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.blanks-color-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.blanks-color-thumbnail {
    flex: 0 0 auto;
    width: 80px;
    text-align: center;
    cursor: pointer;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.blanks-color-thumbnail:hover {
    border-color: #ddd;
}

.blanks-color-thumbnail.selected {
    border-color: #4CAF50;
    background: #f0f8f0;
}

.blanks-color-thumbnail img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.blanks-color-thumbnail span {
    display: block;
    font-size: 11px;
    color: #666;
    word-wrap: break-word;
}

/* Size and Quantity Grid */
.blanks-size-quantity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.blanks-size-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
}

.blanks-size-item.out-of-stock {
    opacity: 0.5;
    background: #f5f5f5;
}

.blanks-size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.blanks-size-name {
    font-weight: bold;
    font-size: 14px;
}

.blanks-size-inventory {
    font-size: 12px;
    color: #666;
}

.blanks-size-inventory.in-stock {
    color: #4CAF50;
}

.blanks-size-inventory.low-stock {
    color: #ff9800;
}

.blanks-size-inventory.out-of-stock {
    color: #f44336;
}

.blanks-quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blanks-quantity-control label {
    font-size: 12px;
    color: #666;
    margin-right: 5px;
}

.blanks-quantity-input {
    width: 70px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.blanks-quantity-input:disabled {
    background: #e9e9e9;
    cursor: not-allowed;
}

.blanks-availability {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
    background: #f5f5f5;
    font-weight: bold;
}

/* Form Styles */
.blanks-form-group {
    margin-bottom: 20px;
}

.blanks-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.blanks-form-group input,
.blanks-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.blanks-form-group input:focus,
.blanks-form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Button Styles */
.blanks-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.blanks-btn-primary {
    background: #4CAF50;
    color: white;
}

.blanks-btn-primary:hover:not(:disabled) {
    background: #45a049;
}

.blanks-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.blanks-btn:hover {
    opacity: 0.9;
}

.blanks-view-style,
.blanks-add-to-cart-btn {
    width: 100%;
}

/* Cart Styles */
.blanks-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.blanks-cart-table th,
.blanks-cart-table td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.blanks-cart-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.blanks-cart-quantity {
    width: 80px;
    padding: 5px;
    text-align: center;
}

.blanks-remove-item {
    background: #f44336;
    color: white;
    padding: 8px 16px;
}

.blanks-remove-item:hover {
    background: #da190b;
}

.blanks-cart-totals {
    margin-top: 30px;
    text-align: right;
}

.blanks-cart-total {
    margin-bottom: 20px;
}

.blanks-cart-total h3 {
    font-size: 24px;
}

.blanks-cart-actions {
    margin-top: 20px;
}

/* Checkout Styles */
.blanks-checkout-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.blanks-checkout-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.blanks-checkout-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

.blanks-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.blanks-form-row-thirds {
    grid-template-columns: 1fr 1fr 1fr;
}

.blanks-address-confirmation {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border: 2px solid #4CAF50;
}

.blanks-address-confirmation h4 {
    margin-top: 0;
}

.blanks-address-display {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 15px;
    min-height: 100px;
}

.blanks-checkout-items-table {
    width: 100%;
}

.blanks-checkout-items-table td {
    padding: 10px 5px;
    border-bottom: 1px solid #ddd;
}

.blanks-checkout-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
}

.blanks-card-element {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.blanks-card-errors {
    color: #fa755a;
    margin-top: 10px;
}

.blanks-checkout-actions {
    margin-top: 30px;
    text-align: center;
}

#blanks-submit-payment {
    font-size: 18px;
    padding: 15px 40px;
}

#blanks-checkout-processing {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}

#blanks-checkout-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

#blanks-checkout-success h3 {
    color: #155724;
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .blanks-shop-container {
        flex-direction: column;
    }
    
    .blanks-filters {
        width: 100%;
    }
    
    .blanks-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .blanks-checkout-sections {
        grid-template-columns: 1fr;
    }
    
    .blanks-form-row-thirds {
        grid-template-columns: 1fr;
    }
    
    .blanks-size-quantity-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.blanks-size-price {
    color: #2c5282;
    margin-left: 10px;
}

/**
 * Cart Modal & Navigation Styles
 * Add to your assets/css/blanks-styles.css
 */

/* Cart Navigation */
.blanks-cart-nav-item {
    position: relative;
}

.blanks-cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    text-decoration: none !important;
}

.blanks-cart-icon {
    font-size: 20px;
}

.blanks-cart-count {
    position: absolute;
    top: 0;
    right: 5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.blanks-cart-count.hidden {
    display: none;
}

/* Cart Modal */
.blanks-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.blanks-cart-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.blanks-cart-modal-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

#blanks-cart-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.blanks-cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.blanks-cart-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #27ae60;
}

.blanks-cart-modal-close {
    font-size: 32px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
}

.blanks-cart-modal-close:hover {
    color: #333;
}

.blanks-cart-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.blanks-cart-modal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.blanks-cart-modal-table thead {
    background: #f8f9fa;
}

.blanks-cart-modal-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
    border-bottom: 2px solid #dee2e6;
}

.blanks-cart-modal-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.blanks-cart-item-name {
    font-weight: 500;
}

.blanks-cart-modal-quantity {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.blanks-btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
}

.blanks-btn-remove:hover {
    background: #c0392b;
}

.blanks-cart-modal-total {
    text-align: right;
    padding: 15px 0;
    border-top: 2px solid #333;
    font-size: 18px;
}

.blanks-cart-modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.blanks-continue-shopping {
    flex: 1;
}

.blanks-btn-primary {
    flex: 1;
    background: #27ae60;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s;
}

.blanks-btn-primary:hover {
    background: #229954;
}

.blanks-btn-secondary {
    flex: 1;
    background: white;
    color: #333;
    padding: 12px 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.blanks-btn-secondary:hover {
    border-color: #999;
    background: #f8f9fa;
}

/* Checkout Page Editable Table */
.blanks-checkout-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.blanks-checkout-items-table thead {
    background: #f8f9fa;
}

.blanks-checkout-items-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.blanks-checkout-items-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.blanks-checkout-quantity {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.blanks-checkout-remove-item {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.blanks-checkout-remove-item:hover {
    background: #c0392b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blanks-cart-modal-wrapper {
        padding: 10px;
    }
    
    #blanks-cart-modal-content {
        max-height: 95vh;
    }
    
    .blanks-cart-modal-table {
        font-size: 14px;
    }
    
    .blanks-cart-modal-table th,
    .blanks-cart-modal-table td {
        padding: 8px 6px;
    }
    
    .blanks-cart-item-name {
        font-size: 13px;
    }
    
    .blanks-cart-modal-footer {
        flex-direction: column;
    }
    
    .blanks-checkout-items-table {
        font-size: 14px;
    }
    
    .blanks-checkout-items-table th,
    .blanks-checkout-items-table td {
        padding: 10px 8px;
    }
}

.blanks-cart-modal { z-index: 10000; }
.blanks-cart-modal-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
#blanks-cart-modal, .blanks-cart-modal-overlay, .blanks-cart-modal-wrapper { pointer-events: auto; }
.blanks-cart-nav-item { position: relative; }
.blanks-cart-link { display:flex; align-items:center; gap:6px; text-decoration:none !important; }
.blanks-cart-icon { display:inline-block; line-height:1; }
.blanks-cart-count {
   background:#e74c3c; color:#fff; width:20px; height:20px;
  border-radius:50%; font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.blanks-cart-count.hidden { display:none; }

    
    /* === Cart Button Alignment Fix (override) === */

/* Make the button a clean inline-flex row with tight line-height */
.blanks-cart-button{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border-radius:999px;
  text-decoration:none;
  line-height:1;  
  margin-right: 1rem;/* prevents text from sitting low */
}

/* Ensure the SVG sits on-center instead of baseline */
.blanks-cart-button .blanks-cart-icon{
   min-width:1em;
  height:1em;
  display:block;           /* removes baseline quirks */
}

/* Optional label next to icon */
.blanks-cart-button .blanks-cart-label{
  display:inline-block;
  line-height:1;
}

/* Keep the ABSOLUTE badge only for menu icon usage */
.blanks-cart-nav-item > .blanks-cart-link .blanks-cart-count{
  position:absolute;
  top:0;
  right:5px;
  min-width:1.6em;
  height:1.6em;
  border-radius:50%;
  background:#e74c3c;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700;
}

/* Use a centered PILL inside the button (shortcode widget) */
.blanks-cart-button .blanks-cart-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:1.6em;
  height:1.6em;
  margin-left:2px;
  border-radius:999px;
  background:#111;
  color:#fff;
  font-size:10px;
  font-weight:400;
  line-height:1;
  right: -5px;
}

/* Respect the hidden state everywhere */
.blanks-cart-count.hidden{ display:none !important; }
