/* Offcanvas Bottom Custom - Base Styles */
.offcanvas-bottom-custom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 65vh;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1100;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.offcanvas-bottom-custom.show {
    transform: translateY(0);
}

/* Offcanvas Header */
.offcanvas-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #f0f0f0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.offcanvas-header .handle {
    width: 50px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 10px;
    margin: 0 auto 0 0;
}

.offcanvas-header #closeOffcanvas {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.offcanvas-header #closeOffcanvas:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Offcanvas Body */
.offcanvas-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    gap: 24px;
    background: #f8fafc;
}

/* Left Side - Product Image */
.detail-left {
    flex: 0 0 45%;
    max-width: 45%;
}

.detail-left img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

/* Right Side - Product Details */
.detail-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.4;
    margin-bottom: 4px;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.product-price del {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Attributes Row */
.attr-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.attr-row > div {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.attr-row span {
    color: #1a202c;
    font-weight: 700;
}

/* Color Dots */
.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px #3b82f6;
}

/* Size Chips */
.size-chip {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.size-chip:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}

/* Button Row */
.btn-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: auto;
    padding: 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.btn-row .variant-qty {
    width: 70px;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.btn-row .variant-qty:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn-row .add-to-cart-btn {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-row .add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Other Variants Section */
.other-variants-container {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.other-variants-container .product-title {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #1a202c;
}

.other-variants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.other-variant {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    align-items: center;
}

.other-variant span {
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

.other-variant .variant-qty {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.other-variant .add-to-cart-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    margin-left: auto;
}

.other-variant .add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Overlay */
.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.offcanvas-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .offcanvas-bottom-custom {
        height: 70vh;
    }

    .detail-left {
        flex: 0 0 40%;
        max-width: 40%;
    }

    .detail-left img {
        max-height: 350px;
    }

    .product-title {
        font-size: 1.125rem;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
    .offcanvas-bottom-custom {
        height: 75vh;
    }

    .offcanvas-body {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .detail-left {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .detail-left img {
        max-height: 250px;
        width: 100%;
    }

    .detail-right {
        width: 100%;
    }

    .product-title {
        font-size: 1.125rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .attr-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .btn-row {
        flex-wrap: wrap;
        padding: 12px;
    }

    .btn-row .variant-qty {
        width: 100%;
    }

    .btn-row .add-to-cart-btn {
        width: 100%;
    }

    .other-variant {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .other-variant .variant-qty {
        width: 100%;
    }

    .other-variant .add-to-cart-btn {
        width: 100%;
        margin-left: 0;
    }
}

/* Mobile Portrait (425px - 575px) */
@media (max-width: 575px) {
    .offcanvas-bottom-custom {
        height: 80vh;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }

    .offcanvas-header {
        padding: 12px 16px;
    }

    .offcanvas-body {
        padding: 16px;
        gap: 16px;
    }

    .detail-left img {
        max-height: 200px;
        padding: 12px;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-price {
        font-size: 0.95rem;
    }

    .attr-row {
        padding: 10px;
    }

    .attr-row > div {
        font-size: 0.85rem;
    }

    .btn-row {
        padding: 10px;
        gap: 8px;
    }

    .other-variants-container {
        padding: 16px;
    }

    .other-variants-container .product-title {
        font-size: 0.9rem;
    }

    .other-variant {
        padding: 10px;
        gap: 8px;
    }

    .other-variant span {
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile (< 425px) */
@media (max-width: 424px) {
    .offcanvas-bottom-custom {
        height: 85vh;
    }

    .offcanvas-body {
        padding: 12px;
    }

    .detail-left img {
        max-height: 180px;
        padding: 8px;
    }

    .product-title {
        font-size: 0.95rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .product-price del {
        font-size: 0.85rem;
    }

    .attr-row {
        padding: 8px;
        gap: 8px;
    }

    .btn-row {
        padding: 8px;
    }

    .btn-row .add-to-cart-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    .other-variants-container {
        padding: 12px;
    }

    .other-variant {
        padding: 8px;
    }
}

/* Large Desktop (> 1400px) */
@media (min-width: 1400px) {
    .offcanvas-bottom-custom {
        height: 60vh;
    }

    .offcanvas-body {
        padding: 32px;
        gap: 32px;
    }

    .detail-left {
        flex: 0 0 40%;
        max-width: 40%;
    }

    .detail-left img {
        max-height: 450px;
        padding: 20px;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .product-price {
        font-size: 1.25rem;
    }
}

/* Scrollbar Styling */
.offcanvas-body::-webkit-scrollbar {
    width: 8px;
}

.offcanvas-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.offcanvas-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.offcanvas-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}