/* =============== BASE STYLES =============== */



.error-message {
    color: #e74c3c;
    background: #fde8e8;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
}

/* =============== PRODUCT PAGE SPECIFIC STYLES =============== */
.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0;
    align-items: flex-start;
}

.product-image-container {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.main-image-wrapper {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-product-image {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

.thumbnail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail-item:hover {
    border-color: #FFD700;
    transform: scale(1.05);
}

.product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
    min-width: 300px;
}

.product-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.price-availability {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.price {
    color: #e74c3c;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stock-status {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-status.in-stock {
    color: #27ae60;
}

.stock-status.out-of-stock {
    color: #e74c3c;
}

.add-to-cart-form {
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.quantity-selector {
    margin-bottom: 20px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    max-width: 150px;
}

.quantity-input {
    width: 50px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 0;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.quantity-btn.minus {
    border-radius: 4px 0 0 4px;
}

.quantity-btn.plus {
    border-radius: 0 4px 4px 0;
}

.btn-add-to-cart {
    background-color: #FFD700;
    color: #333;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-to-cart:hover {
    background-color: #f1c40f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-description {
    margin: 30px 0;
    line-height: 1.7;
}

.product-description h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 5px;
    display: inline-block;
}

.product-specs {
    margin: 30px 0;
}

.product-specs h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 5px;
    display: inline-block;
}

.specs-list {
    list-style-type: none;
    padding: 0;
}

.specs-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
}

.specs-list li strong {
    min-width: 100px;
    display: inline-block;
    color: #555;
}

/* Product Videos Section */
.product-videos {
    margin: 50px 0;
}

.section-title {
    font-size: 22px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 5px;
    display: inline-block;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Product Not Found */
.product-not-found {
    text-align: center;
    padding: 50px 20px;
}

.product-not-found h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.btn-browse {
    display: inline-block;
    background: #FFD700;
    color: #333;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-browse:hover {
    background: #f1c40f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Add to Cart Notification */
.add-to-cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s, fadeOut 0.5s 2.5s forwards;
}

@keyframes slideIn {
    from { right: -100px; opacity: 0; }
    to { right: 20px; opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    transition: opacity 0.3s;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}




.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    padding: 20px;
    user-select: none;
    transition: opacity 0.3s;
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-arrow:hover {
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 70vh;
    }
    
    .modal-arrow {
        font-size: 30px;
        padding: 15px;
    }
    
    .set-as-main-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

/* Close Button - Larger for mobile */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

/* Navigation Arrows - Larger for mobile */
.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    z-index: 1001;
    padding: 30px 20px;
    user-select: none;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev {
    left: 10px;
}

.modal-next {
    right: 10px;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 35px;
        width: 40px;
        height: 40px;
    }
    
    .modal-arrow {
        font-size: 40px;
        padding: 25px 15px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 70vh;
    }
}

/* Very small devices */
@media (max-width: 480px) {
    .modal-arrow {
        font-size: 30px;
        padding: 20px 10px;
    }
    
    .modal-close {
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
}