/* ============================================
   WalmShade Frontend Styles — Product Shade Card
   ============================================ */

/* ── Main Card ── */
.walm-product-shade-card {
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    font-family: inherit;
    transition: box-shadow 0.2s ease;
}

.walm-product-shade-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── Header ── */
.walm-ps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.walm-ps-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.walm-ps-icon {
    width: 18px;
    height: 18px;
    color: #6366f1;
    flex-shrink: 0;
}

.walm-ps-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.walm-ps-theme-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #6366f1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 99px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* ── Body ── */
.walm-ps-body {
    padding: 14px 16px;
}

/* ── Color Row ── */
.walm-ps-color-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Thumbnail */
.walm-ps-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f1f5f9;
}

.walm-ps-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hex Swatch (fallback when no image) */
.walm-ps-swatch {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* ── Info ── */
.walm-ps-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.walm-ps-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.walm-ps-detail-label {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 36px;
    flex-shrink: 0;
}

.walm-ps-detail-value {
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.walm-ps-detail-value code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.walm-ps-detail-value.walm-ps-code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
}

.walm-ps-hex-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── Variation Prompt ── */
.walm-ps-variation-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

.walm-ps-prompt-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
}

/* ── Variable Product Transition ── */
.walm-variable {
    transition: opacity 0.2s ease;
}

.walm-variable.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Legacy Classes (backward compat) ── */
.walm-shade-card-info {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
}

.walm-shade-card-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.walm-color-details {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.walm-color-image img {
    max-width: 60px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.walm-color-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.walm-color-code,
.walm-color-name,
.walm-color-hex {
    display: flex;
    align-items: center;
    gap: 5px;
}

.walm-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    vertical-align: middle;
    flex-shrink: 0;
}

.walm-no-color {
    color: #999;
    font-style: italic;
    margin: 5px 0;
    font-size: 13px;
}

.walm-shade-card-content {
    width: 100%;
}

/* ============================================
   Cart
   ============================================ */
.walm-cart-color-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font-size: 12px;
    color: #666;
}

.walm-cart-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #ccc;
    border-radius: 2px;
    vertical-align: middle;
    flex-shrink: 0;
}

.walm-cart-color-image {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #ddd;
}

/* ============================================
   Order Details
   ============================================ */
.walm-order-item-details {
    margin-top: 5px;
    padding: 5px 8px;
    background: #f9f9f9;
    border-radius: 3px;
    font-size: 12px;
}

.walm-order-item-details div {
    margin-bottom: 2px;
}

.walm-order-item-details div:last-child {
    margin-bottom: 0;
}

/* ============================================
    Email
    ============================================ */
.walm-email-color-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
     .walm-ps-color-row {
         flex-direction: column;
         align-items: flex-start;
     }

     .walm-ps-thumb,
     .walm-ps-swatch {
         width: 48px;
         height: 48px;
     }

     .walm-color-details {
         flex-direction: column;
         align-items: flex-start;
     }

.walm-elementor-colors-grid {
          grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      }
  }

 @media (max-width: 480px) {
     .walm-ps-header {
         padding: 10px 12px;
     }

     .walm-ps-body {
         padding: 12px;
     }

     .walm-ps-thumb,
     .walm-ps-swatch {
         width: 40px;
         height: 40px;
     }
 }
