/**
 * Simple Product Compare - Style TOPLASER (With Recent View)
 * - Font: Titillium Web
 * - Radius: 0px
 */

:root {
    --color-primary: #0f4c81;   
    --color-green: #3f9c35;     
    --color-red: #d32f2f;       
    --color-red-hover: #b71c1c;
    --color-grey-btn: #e6e6e6;  
    --color-grey-hover: #d6d6d6;
    --color-text-dark: #333333;
    --border-radius: 0px;       
    --font-main: 'Titillium Web', sans-serif;
}

.compare-btn, #compare-floating-bar, .compare-table-wrapper, .compare-toast {
    font-family: var(--font-main) !important;
}

/* --- NOWE STYLE DLA PUSTEGO STANU --- */
.compare-empty-state {
    text-align: center;
    padding: 40px 0;
}

.compare-message {
    padding: 30px;
    background: #fff;
    border: 0px;
}

.compare-message h3 {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.compare-recent-products {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 40px;
    text-align: left;
}

.compare-recent-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 20px;
    border-left: 4px solid var(--color-primary);
    padding-left: 15px;
}

/* Reszta standardowych styli */
.compare-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 5px 15px; margin-top: 5px;
    background-color: #fff; border-radius: 0px !important; border: 1px solid #ccc; color: #555;
    font-size: 13px; font-weight: 600; text-transform: none; cursor: pointer; transition: all 0.2s ease;
    box-sizing: border-box; line-height: 1.2; min-height: 36px;
}

.compare-btn:hover { background-color: #f9f9f9; color: #333; border-color: #999; }
.compare-btn .compare-icon svg { width: 14px; height: 14px; stroke-width: 2px; display: block; opacity: 0.6; transition: all 0.2s; }
.compare-btn:hover .compare-icon svg { opacity: 1; }
.compare-btn.added { background-color: #fff; border: 1px solid #ccc; color: var(--color-text-dark); }
.compare-btn.added .compare-icon svg { color: var(--color-red); fill: var(--color-red); opacity: 1; }
.compare-btn.added:hover { border-color: #999; background-color: #f9f9f9; }
.compare-btn.loading { opacity: 0.6; cursor: wait; }

#compare-floating-bar {
    position: fixed; bottom: 0; right: 20px; background: #fff; border-radius: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1); z-index: 99999; min-width: 280px;
    border: 1px solid #ddd; border-bottom: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform: translateY(0); opacity: 1; visibility: visible;
}
#compare-floating-bar.hidden { transform: translateY(100%); opacity: 0; visibility: hidden; box-shadow: none; }

.compare-bar-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background: var(--color-primary); color: #fff; cursor: pointer; font-size: 13px; font-weight: 600; text-transform: uppercase; }
.compare-bar-toggle { background: transparent; border: none; color: #fff; cursor: pointer; padding: 0; }
.compare-bar-items { display: flex; gap: 10px; padding: 15px; background: #fff; border-bottom: 1px solid #eee; justify-content: center; flex-wrap: wrap; }
.compare-bar-item { position: relative; width: 50px; height: 50px; border: 1px solid #ccc; background: #fff; overflow: hidden; }
.compare-bar-item img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.compare-bar-item-remove { position: absolute; top: 0; right: 0; width: 18px; height: 18px; background: var(--color-red); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; padding: 0; transition: background 0.2s; opacity: 1; border-radius: 0px; }
.compare-bar-item-remove:hover { background: var(--color-red-hover); }
.compare-bar-item-remove svg { width: 10px; height: 10px; stroke-width: 3px; display: block; }
.compare-bar-actions { padding: 12px; text-align: center; background: #f9f9f9; }
.compare-bar-btn { display: block; background: var(--color-green); color: #fff !important; padding: 10px 0; text-decoration: none; font-size: 13px; font-weight: 700; text-transform: uppercase; transition: background 0.2s; width: 100%; }
.compare-bar-btn:hover { background: #368a2e; }
#compare-floating-bar.collapsed .compare-bar-items, #compare-floating-bar.collapsed .compare-bar-actions { display: none; }
#compare-floating-bar.collapsed .compare-bar-toggle svg { transform: rotate(180deg); }

.compare-table-wrapper { overflow-x: auto; margin: 30px 0; border: 1px solid #e5e5e5; }
.compare-table { width: 100%; border-collapse: collapse; background: #fff; min-width: 800px; }
.compare-table th, .compare-table td { padding: 15px; border: 1px solid #e5e5e5; text-align: center; vertical-align: middle; font-size: 14px; color: var(--color-text-dark); }
.compare-product-header { position: relative !important; background: #fff; border-bottom: 3px solid var(--color-primary); vertical-align: top; padding-top: 15px; }
.compare-product-header a { text-decoration: none; color: var(--color-text-dark); display: block; padding-top: 20px; }
.compare-product-header img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 10px; }
.compare-product-header h4 { font-family: var(--font-main); font-size: 18px !important; line-height: 1.3; color: var(--color-primary); margin: 10px 0 0 0; font-weight: 700; text-transform: uppercase; }

.compare-remove { position: absolute; top: 0; right: 0; width: 32px; height: 32px; background: var(--color-red); color: #fff; border: none; border-radius: 0px !important; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 20; padding: 0; transition: all 0.2s ease; }
.compare-remove:hover { background: var(--color-red-hover); color: #fff; }
.compare-remove svg { width: 14px; height: 14px; stroke-width: 2px; display: block; }

.compare-label { text-align: left !important; background: #f4f4f4 !important; width: 200px; font-weight: 700; color: #555; font-size: 12px; text-transform: uppercase; }
.compare-price { font-size: 18px; font-weight: 700; color: var(--color-text-dark); }
.compare-price del { font-size: 13px; color: #999; font-weight: 400; display: block; }
.compare-price ins { text-decoration: none; }
.in-stock { color: var(--color-green); font-weight: 700; text-transform: uppercase; font-size: 12px; }
.out-of-stock { color: var(--color-red); font-weight: 700; text-transform: uppercase; font-size: 12px; }

.compare-actions-row .add_to_cart_button, .compare-actions-row .button { background-color: var(--color-primary) !important; color: #fff !important; padding: 10px 15px !important; text-transform: uppercase; font-weight: 700; font-size: 12px; border: none; border-radius: 0 !important; display: inline-block; font-family: var(--font-main) !important; }
.compare-actions-row .add_to_cart_button:hover { background-color: #0b3a63 !important; }

/* --- NOWY: Przycisk Przejdź do sklepu (Niebieski) --- */
.compare-go-shop { background: var(--color-primary) !important; border: 1px solid var(--color-primary) !important; color: #fff !important; padding: 12px 30px !important; text-transform: uppercase; font-weight: 700; font-size: 13px; margin-top: 20px; cursor: pointer; display: inline-block; text-decoration: none; font-family: var(--font-main) !important; border-radius: 0px !important; transition: all 0.2s ease; letter-spacing: 1px; }
.compare-go-shop:hover { background: #0b3a63 !important; }

.compare-clear-all { background: #333 !important; border: 1px solid #333 !important; color: #fff !important; padding: 12px 30px !important; text-transform: uppercase; font-weight: 700; font-size: 13px; margin-top: 20px; cursor: pointer; font-family: var(--font-main) !important; border-radius: 0px !important; transition: all 0.2s ease; }
.compare-clear-all:hover { background: var(--color-red) !important; border-color: var(--color-red) !important; }

.compare-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: #fff; padding: 15px 30px; font-size: 13px; font-weight: 700; text-transform: uppercase; border-radius: 0; box-shadow: 0 5px 20px rgba(0,0,0,0.2); z-index: 100000; animation: fadeUp 0.3s ease; }
.compare-toast.error { background: var(--color-red); }
@keyframes fadeUp { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 768px) { #compare-floating-bar { width: 100%; right: 0; left: 0; bottom: 0; } .compare-btn { font-size: 10px; padding: 8px 2px; } }