/* ============================================
   WooCommerce Linked Products Custom Swatches
   Frontend Styles v9.1 - Full 13-Style Library
   ============================================ */

.wclpcs-linked-variations { margin: 15px 0; padding: 10px 0; }
.wclpcs-attribute-group { margin-bottom: 15px; }
.wclpcs-attribute-label { margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.wclpcs-attribute-name { color: #333; }
.wclpcs-attribute-value { color: #777; margin-left: 5px; }
.wclpcs-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.wclpcs-swatch { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; position: relative; cursor: pointer; transition: all 0.2s ease; }
.wclpcs-swatch.active { border-color: #000 !important; box-shadow: 0 0 0 2px #000; }
.wclpcs-swatch:hover { transform: scale(1.05); }
.wclpcs-swatch-inner { display: flex; align-items: center; justify-content: center; overflow: hidden; }

.wclpcs-badge { position: absolute; top: -8px; right: -8px; background: #ff4444; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; z-index: 2; text-transform: uppercase; white-space: nowrap; }
.wclpcs-swatch-label { display: block; font-size: 11px; color: #666; margin-top: 4px; text-align: center; }
.wclpcs-swatch-price { display: block; font-size: 10px; color: #999; text-align: center; margin-top: 2px; }

/* ============================================
   1: IMAGE SWATCH - Thumbnail Only
   ============================================ */
.wclpcs-swatches-image .wclpcs-swatch { display: inline-block; padding: 4px; border: none; background: transparent; vertical-align: middle; transition: transform 0.2s ease; }
.wclpcs-swatches-image .wclpcs-swatch:hover { transform: scale(1.05); }
.wclpcs-swatches-image .wclpcs-swatch.active .wclpcs-swatch-inner { border: 3px solid #000; box-shadow: 0 0 0 1px #fff; }
.wclpcs-swatches-image .wclpcs-swatch-inner { width: 50px; height: 50px; min-width: 50px; min-height: 50px; background-size: cover; background-position: center; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); display: block; box-sizing: border-box; }
.wclpcs-swatches-image .wclpcs-swatch-label,
.wclpcs-swatches-image .wclpcs-swatch-price { display: none; }

/* ============================================
   2: CIRCULAR SWATCH - Round Image
   ============================================ */
.wclpcs-swatches-circular .wclpcs-swatch { display: inline-block !important; border: none !important; background: transparent !important; padding: 4px !important; vertical-align: middle !important; transition: transform 0.2s ease !important; box-shadow: none !important; }
.wclpcs-swatches-circular .wclpcs-swatch:hover { transform: scale(1.05); }
.wclpcs-swatches-circular .wclpcs-swatch.active .wclpcs-swatch-inner { border: 3px solid #000 !important; box-shadow: 0 0 0 1px #fff !important; }
.wclpcs-swatches-circular .wclpcs-swatch-inner { width: 60px !important; height: 60px !important; min-width: 60px !important; min-height: 60px !important; background-size: cover !important; background-position: center !important; border-radius: 50% !important; border: 1px solid rgba(0,0,0,.1) !important; display: block !important; box-sizing: border-box !important; overflow: hidden !important; }
.wclpcs-swatches-circular .wclpcs-swatch-label,
.wclpcs-swatches-circular .wclpcs-swatch-price { display: none !important; }

/* ============================================
   3: SQUARE SWATCH - Square Image + Label
   ============================================ */
.wclpcs-swatches-square .wclpcs-swatch { flex-direction: column; align-items: center; padding: 5px; border-radius: 4px; }
.wclpcs-swatches-square .wclpcs-swatch-inner { width: 50px; height: 50px; background-size: cover; background-position: center; border-radius: 4px; border: 1px solid rgba(0,0,0,.1); display: inline-block; }
.wclpcs-swatches-square .wclpcs-swatch.active .wclpcs-swatch-inner { outline: 2px solid #000; outline-offset: 2px; border-color: transparent; }
.wclpcs-swatches-square .wclpcs-swatch-label { text-align: center; margin-top: 5px; font-size: 11px; font-weight: 500; }
.wclpcs-swatches-square .wclpcs-swatch-price { display: none; }

/* ============================================
   4: POLAROID SWATCH - Large Image + Label + Price
   ============================================ */
.wclpcs-swatches-polaroid .wclpcs-swatch { flex-direction: column; align-items: center; padding: 6px; border-radius: 6px; border: 2px solid #eee; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.wclpcs-swatches-polaroid .wclpcs-swatch-inner { width: 120px; height: 120px; background-size: cover; background-position: center; border-radius: 4px; }
.wclpcs-swatches-polaroid .wclpcs-swatch-label { text-align: center; font-size: 12px; font-weight: 600; margin-top: 4px; }
.wclpcs-swatches-polaroid .wclpcs-swatch-price { text-align: center; font-size: 11px; color: #888; }

/* ============================================
   5: SWATCH BOX - Image + Label + Price in Box
   ============================================ */
.wclpcs-swatches-swatch_box .wclpcs-swatch { flex-direction: column; align-items: center; padding: 5px; border: 2px solid #ddd; border-radius: 8px; background: #fff; width: 110px; overflow: hidden; }
.wclpcs-swatches-swatch_box .wclpcs-swatch-inner { width: 110px; height: 110px; background-size: cover; background-position: center; border-radius: 2px; }
.wclpcs-swatches-swatch_box .wclpcs-swatch.active { border-color: #333; box-shadow: 0 0 0 2px #333; }
.wclpcs-swatches-swatch_box .wclpcs-swatch-label { text-align: center; font-size: 11px; font-weight: 600; margin-top: 4px; padding-top: 8px; border-top: 1px solid #f0f0f0; width: 100%; }
.wclpcs-swatches-swatch_box .wclpcs-swatch-price { text-align: center; font-size: 10px; color: #888; }

/* ============================================
   6: SWATCH PILLS - Pill Shape with Image + Label
   ============================================ */
.wclpcs-swatches-swatch_pills .wclpcs-swatch { flex-direction: row; align-items: center; padding: 6px 16px 6px 6px; border-radius: 50px; border: 2px solid #ddd; background: #f5f5f5; gap: 8px; }
.wclpcs-swatches-swatch_pills .wclpcs-swatch.active { border-color: #333; background: #eee; }
.wclpcs-swatches-swatch_pills .wclpcs-swatch-inner { padding: 0; background-size: cover; background-position: center; width: 36px; height: 36px; border-radius: 50%; }
.wclpcs-swatches-swatch_pills .wclpcs-swatch-label { display: inline; font-size: 13px; margin-top: 0; }
.wclpcs-swatches-swatch_pills .wclpcs-swatch-price { display: none; }

/* ============================================
   7: SWATCH DROPDOWN - Custom Dropdown with Image + Label
   ============================================ */
.wclpcs-swatches-swatch_dropdown { flex-direction: column; align-items: flex-start; }
.wclpcs-dropdown-container { position: relative; width: 100%; max-width: 320px; user-select: none; }
.wclpcs-dropdown-selected { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; }
.wclpcs-dropdown-selected img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; margin-right: 8px; }
.wclpcs-dropdown-selected span { flex-grow: 1; }
.wclpcs-dropdown-arrow { border: solid #666; border-width: 0 2px 2px 0; display: inline-block; padding: 3px; transform: rotate(45deg); margin-left: 8px; }
.wclpcs-dropdown-list { position: absolute; top: 100%; left: 0; width: 100%; background: #fff; border: 1px solid #ddd; border-top: none; border-radius: 0 0 4px 4px; list-style: none; margin: 0; padding: 0; display: none; z-index: 100; box-shadow: 0 5px 15px rgba(0,0,0,.1); }
.wclpcs-dropdown-item { display: flex; align-items: center; padding: 10px 15px; cursor: pointer; transition: background .2s; text-decoration: none; color: inherit; }
.wclpcs-dropdown-item:hover { background: #f9f9f9; }
.wclpcs-dropdown-item.selected { background: #f0f0f0; font-weight: 700; }
.wclpcs-dropdown-img { width: 30px; height: 30px; border-radius: 4px; margin-right: 10px; object-fit: cover; flex-shrink: 0; }
.wclpcs-dropdown-label-text { flex-grow: 1; font-size: 14px; }
.wclpcs-dropdown-price-text { font-size: 12px; color: #888; margin-left: 8px; }

/* ============================================
   8: BUTTON - Text Button
   ============================================ */
.wclpcs-swatches-button .wclpcs-swatch { padding: 10px 20px; justify-content: center; align-items: center; border-radius: 4px; min-width: 80px; flex-direction: row; font-size: 14px; font-weight: 600; background: #fff; color: #333; border: 2px solid #ccc; }
.wclpcs-swatches-button .wclpcs-swatch:hover { background: #f5f5f5; }
.wclpcs-swatches-button .wclpcs-swatch.active { background: #333; color: #fff; border-color: #333; }
.wclpcs-swatches-button .wclpcs-swatch-inner { padding: 0; background: none; font-size: 14px; font-weight: 600; }

/* ============================================
   9: BUTTON PILL - Rounded Text Button
   ============================================ */
.wclpcs-swatches-button_pill .wclpcs-swatch { padding: 10px 24px; justify-content: center; align-items: center; border-radius: 50px; min-width: 80px; flex-direction: row; font-size: 14px; font-weight: 600; background: #fff; color: #333; border: 2px solid #ccc; }
.wclpcs-swatches-button_pill .wclpcs-swatch:hover { background: #f5f5f5; }
.wclpcs-swatches-button_pill .wclpcs-swatch.active { background: #333; color: #fff; border-color: #333; }
.wclpcs-swatches-button_pill .wclpcs-swatch-inner { padding: 0; background: none; font-size: 14px; font-weight: 600; }

/* ============================================
   10: RADIO BUTTON - Radio Circle + Label + Price
   ============================================ */
.wclpcs-swatches-radio_button .wclpcs-swatch { display: inline-flex; border: 1px solid #eee; background: #fff; padding: 8px 12px; border-radius: 6px; align-items: center; gap: 10px; width: auto; margin-right: 10px; margin-bottom: 10px; vertical-align: middle; transition: all 0.2s ease; }
.wclpcs-swatches-radio_button .wclpcs-swatch:hover { border-color: #4a90d9; background: #fafafa; }
.wclpcs-swatches-radio_button .wclpcs-swatch.active { border-color: #4a90d9; background: #f0f7ff; box-shadow: 0 2px 5px rgba(74, 144, 217, 0.1); }
.wclpcs-swatches-radio_button .wclpcs-radio-circle { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ccc; display: inline-block; position: relative; flex-shrink: 0; background: #fff; box-sizing: border-box; }
.wclpcs-swatches-radio_button .wclpcs-swatch.active .wclpcs-radio-circle { border-color: #4a90d9; }
.wclpcs-swatches-radio_button .wclpcs-swatch.active .wclpcs-radio-circle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 8px; height: 8px; border-radius: 50%; background: #4a90d9; }
.wclpcs-swatches-radio_button .wclpcs-swatch-inner { display: flex; align-items: center; }
.wclpcs-swatches-radio_button .wclpcs-swatch-label { font-size: 14px; font-weight: 500; color: #333; margin: 0; }
.wclpcs-swatches-radio_button .wclpcs-swatch-price { font-size: 12px; color: #888; margin-left: 5px; }

/* ============================================
   11: COLOR SWATCH - Color Dot Circles
   ============================================ */
.wclpcs-swatches-color .wclpcs-swatch { border: 2px solid transparent; background: none; align-items: center; justify-content: center; border-radius: 50%; width: 44px; height: 44px; padding: 2px; }
.wclpcs-swatches-color .wclpcs-swatch:hover { transform: scale(1.15); box-shadow: none; }
.wclpcs-swatches-color .wclpcs-swatch.active { border-color: #000; border-width: 3px; }
.wclpcs-swatches-color .wclpcs-swatch-inner { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.wclpcs-swatches-color .wclpcs-swatch-label,
.wclpcs-swatches-color .wclpcs-swatch-price { display: none; }

/* ============================================
   12: AS BUTTON - Custom Background Color
   ============================================ */
.wclpcs-swatches-as_button .wclpcs-swatch { padding: 0; border-radius: 4px; justify-content: center; align-items: center; min-width: 80px; border: none; flex-direction: row; }
.wclpcs-swatches-as_button .wclpcs-swatch:hover { opacity: .85; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.wclpcs-swatches-as_button .wclpcs-swatch.active { outline: 3px solid #333; outline-offset: 2px; }
.wclpcs-swatches-as_button .wclpcs-swatch-inner { padding: 10px 20px; font-size: 14px; font-weight: 600; text-align: center; }

/* ============================================
   13: TRADITIONAL DROPDOWN
   ============================================ */
.wclpcs-swatches-dropdown { flex-direction: column; align-items: flex-start; }
.wclpcs-dropdown-group select { padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; min-width: 200px; background: #fff; cursor: pointer; appearance: auto; }
.wclpcs-dropdown-group select:focus { border-color: #333; outline: none; }

/* ============================================
   HIDE TITLE / HIDE PRICE - controlled by link settings
   ============================================ */
.wclpcs-hide-title .wclpcs-swatch-label { display: none !important; }
.wclpcs-hide-price .wclpcs-swatch-price { display: none !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .wclpcs-swatches { gap: 6px; }
    .wclpcs-swatches-image .wclpcs-swatch-inner,
    .wclpcs-swatches-circular .wclpcs-swatch-inner,
    .wclpcs-swatches-square .wclpcs-swatch-inner { width: 40px; height: 40px; }
    .wclpcs-swatches-polaroid .wclpcs-swatch-inner { width: 90px; height: 90px; }
    .wclpcs-swatches-swatch_box { width: 90px; }
    .wclpcs-swatches-swatch_box .wclpcs-swatch-inner { width: 90px; height: 90px; }
}
