/* ═══════════════════════════════════
   SHOP MODULE (RR Kabel Style)
   ═══════════════════════════════════ */

.shop-section {
    padding: var(--section-py) 0;
    min-height: 80vh;
    background-color: #ffffff;
}

.shop-header {
    text-align: center;
    margin-bottom: 50px;
}

.shop-header h1 {
    font-size: 2.5rem;
    color: var(--color-charcoal);
    margin-bottom: 15px;
    font-weight: 800;
}

.shop-header p {
    color: var(--color-mid-gray);
    font-size: 1.1rem;
}

/* ── MAIN CONTENT ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* ── PRODUCT CARD ── */
.product-card {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(211, 47, 47, 0.08), transparent 40%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.product-card:hover .product-title {
    color: var(--brand-red);
}

.product-image-box, .compare-checkbox-wrapper {
    position: relative;
    z-index: 2;
}

.product-info-minimal {
    position: relative;
    z-index: 3;
}

.product-image-box {
    width: 100%;
    aspect-ratio: 1/1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
}

.product-image-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.product-image-front,
.product-image-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-back {
    transform: rotateY(180deg);
}

.product-image-inner.is-flipped {
    transform: rotateY(180deg);
}

.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-title {
    font-size: 1rem;
    color: #222;
    text-align: center;
    margin: 0;
    padding: 12px 15px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.color-swatches {
    display: flex;
    gap: 8px;
    align-items: center;
}

.swatch-btn {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #ccc;
    box-shadow: 0 0 0 2px transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.swatch-btn:hover {
    transform: scale(1.1);
}

.swatch-btn.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--brand-red);
    transform: scale(1.1);
}

/* ── QUICK VIEW MODAL ── */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 8px;
    display: flex;
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    color: var(--brand-red);
}

.modal-img-col {
    flex: 1;
    background: #f4f4f4;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img-col img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease-in-out;
}

.modal-img-col img.fade-out {
    opacity: 0;
}

.modal-info-col {
    flex: 1;
    padding: 40px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-category {
    font-size: 0.8rem;
    color: var(--brand-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--color-charcoal);
    margin: 0 0 20px 0;
}

.modal-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.modal-features {
    padding-left: 20px;
    margin-bottom: 20px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-features li {
    margin-bottom: 5px;
}

.modal-specs {
    margin-bottom: 25px;
}

.modal-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.9rem;
}

.modal-spec-key {
    color: #666;
    font-weight: 500;
}

.modal-spec-val {
    color: #222;
    font-weight: 700;
    text-align: right;
    max-width: 50%;
}

.btn-whatsapp-inquiry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: #25D366;
    color: white;
    padding: 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: var(--fw-bold);
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.btn-whatsapp-inquiry:hover {
    background-color: #128C7E;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        flex-direction: column;
        overflow-y: auto;
    }

    .modal-img-col {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .shop-container {
        flex-direction: column;
    }

    .shop-sidebar {
        width: 100%;
        margin-bottom: 30px;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ── PRODUCT COMPARE FEATURE ── */
.compare-checkbox-wrapper {
    padding: 10px 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    text-align: center;
}

.compare-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.compare-label input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-red);
}

.compare-tray {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 9998;
    padding: 15px 0;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--brand-red);
}

.compare-tray.show {
    bottom: 0;
}

.compare-tray-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
}

.compare-tray-items {
    display: flex;
    gap: 15px;
    flex: 1;
}

.compare-tray-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f4f4;
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
    max-width: 200px;
}

.compare-tray-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
}

.compare-tray-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-tray-item-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-tray-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.compare-tray-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.btn-compare {
    background: var(--brand-red);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-compare:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Compare Modal */
.compare-modal-content {
    max-width: 1000px;
    width: 95%;
    padding: 30px;
    flex-direction: column;
    overflow-y: auto;
}

.compare-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.compare-table th, .compare-table td {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
}

.compare-table th {
    background: #f9f9f9;
    font-weight: bold;
    color: #333;
    width: 20%;
}

.compare-table td {
    width: 26%;
}

.compare-item-header img {
    max-width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.compare-item-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #222;
}

.compare-spec-row td {
    font-size: 0.9rem;
    color: #555;
}

.compare-spec-row th {
    text-align: right;
    padding-right: 20px;
}

@media (max-width: 768px) {
    .compare-tray-content {
        flex-direction: column;
        gap: 10px;
    }
    .compare-tray-items {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .compare-tray-actions {
        width: 100%;
        justify-content: space-between;
    }
    .compare-table th, .compare-table td {
        padding: 10px;
    }
}