/* Product Detail Page Styles */

.breadcrumb {
    padding: 15px 5%;
    background-color: #f8f9fa;
    font-size: 14px;
}

.dark-theme .breadcrumb {
    background-color: #1e1e1e;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb .current {
    color: var(--text-color);
    font-weight: 500;
}

.dark-theme .breadcrumb .current {
    color: var(--light-text);
}

/* Product Detail Section */
.product-detail {
    display: flex;
    flex-wrap: wrap;
    padding: 40px 5%;
    gap: 40px;
}

.product-images {
    flex: 1;
    min-width: 400px;
}

.main-image {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.thumbnail-images img:hover, 
.thumbnail-images img.active {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--secondary-color);
}

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

.product-info h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.dark-theme .product-info h1 {
    color: var(--light-text);
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-rating i {
    color: #ffd700;
    font-size: 18px;
    margin-right: 2px;
}

.rating-text {
    margin-left: 10px;
    color: #666;
    font-size: 14px;
}

.dark-theme .rating-text {
    color: #aaa;
}

.product-price {
    margin-bottom: 20px;
}

.current-price {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
}

.dark-theme .current-price {
    color: var(--secondary-color);
}

.original-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.discount {
    font-size: 16px;
    color: #e74c3c;
    font-weight: 500;
    margin-left: 10px;
}

.availability {
    margin-bottom: 20px;
}

.in-stock {
    color: #27ae60;
    font-weight: 500;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: 500;
}

.stock-quantity {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
}

.dark-theme .stock-quantity {
    color: #aaa;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Product Variants */
.product-variants {
    margin-bottom: 30px;
}

.variant-group {
    margin-bottom: 20px;
}

.variant-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--primary-color);
}

.dark-theme .variant-group label {
    color: var(--light-text);
}

.color-options {
    display: flex;
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: 0 0 0 1px #ddd;
    transition: transform 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.dark-theme .color-option.active {
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.size-options {
    display: flex;
    gap: 10px;
}

.size-option {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    padding: 0 10px;
}

.dark-theme .size-option {
    border-color: #444;
}

.size-option:hover {
    border-color: var(--primary-color);
}

.dark-theme .size-option:hover {
    border-color: var(--secondary-color);
}

.size-option.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.dark-theme .size-option.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

/* Delivery Info */
.product-delivery-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.dark-theme .product-delivery-info {
    background-color: #1e1e1e;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
}

.delivery-option i {
    font-size: 24px;
    color: var(--primary-color);
}

.dark-theme .delivery-option i {
    color: var(--secondary-color);
}

.delivery-option h4 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-color);
}

.dark-theme .delivery-option h4 {
    color: var(--light-text);
}

.delivery-option p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

.dark-theme .delivery-option p {
    color: #aaa;
}

/* Add to Cart Notification */
.add-to-cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.dark-theme .add-to-cart-notification {
    background-color: var(--dark-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.add-to-cart-notification i {
    font-size: 24px;
    color: #27ae60;
}

.add-to-cart-notification div {
    flex-grow: 1;
}

.add-to-cart-notification p {
    margin: 0;
}

.add-to-cart-notification .product-name {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark-theme .add-to-cart-notification .product-name {
    color: #aaa;
}

.add-to-cart-notification button {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
}

.dark-theme .add-to-cart-notification button {
    color: #777;
}

.quantity-selector {
    display: flex;
    align-items: center;
    height: 44px;
}

.quantity-selector button {
    width: 40px;
    height: 44px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.dark-theme .quantity-selector button {
    background-color: #333;
    color: var(--light-text);
    border-color: #444;
}

.quantity-selector button:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.quantity-selector input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
    font-size: 16px;
}

.dark-theme .quantity-selector input {
    background-color: #333;
    color: var(--light-text);
    border-color: #444;
}

.add-to-cart-btn {
    flex: 1;
    height: 44px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-to-cart-btn:hover {
    background-color: var(--hover-color);
}

.wishlist-btn {
    height: 44px;
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 5px;
}

.dark-theme .wishlist-btn {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.wishlist-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.dark-theme .wishlist-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.shipping-info {
    margin-bottom: 30px;
}

.shipping-info p {
    margin-bottom: 10px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-theme .shipping-info p {
    color: #aaa;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-share span {
    color: #666;
}

.dark-theme .social-share span {
    color: #aaa;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f1f1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
    font-size: 18px;
    transition: var(--transition);
}

.dark-theme .social-icon {
    background-color: #333;
    color: #ddd;
}

.social-icon:hover {
    transform: translateY(-3px);
}

/* Tabs Section */
.product-tabs {
    padding: 0 5% 40px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.dark-theme .tab-btn {
    color: #aaa;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.dark-theme .tab-btn:hover {
    color: var(--secondary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.dark-theme .tab-btn.active {
    color: var(--secondary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.dark-theme .tab-btn.active::after {
    background-color: var(--secondary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.dark-theme .tab-content h3 {
    color: var(--light-text);
}

.feature-list {
    list-style: none;
    margin-top: 20px;
}

.feature-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li i {
    color: #27ae60;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.specs-table th, .specs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.dark-theme .specs-table th, 
.dark-theme .specs-table td {
    border-color: #444;
}

.specs-table th {
    width: 30%;
    color: var(--primary-color);
    font-weight: 600;
}

.dark-theme .specs-table th {
    color: var(--secondary-color);
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
    border-bottom: none;
}

/* Review Section */
.review-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.dark-theme .review-summary {
    border-color: #444;
}

.overall-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.big-rating {
    font-size: 48px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1;
}

.dark-theme .big-rating {
    color: var(--secondary-color);
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #ffd700;
}

.review-count {
    color: #666;
    font-size: 14px;
}

.dark-theme .review-count {
    color: #aaa;
}

.rating-bars {
    flex: 1;
    min-width: 300px;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-bar .stars {
    width: 60px;
}

.rating-bar .bar {
    flex: 1;
    height: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 10px;
}

.dark-theme .rating-bar .bar {
    background-color: #333;
}

.rating-bar .fill {
    height: 100%;
    background-color: #ffd700;
}

.rating-bar .percentage {
    width: 40px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

.dark-theme .rating-bar .percentage {
    color: #aaa;
}

.review-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.dark-theme .review-item {
    border-color: #444;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: 500;
}

.review-date {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
}

.dark-theme .review-date {
    color: #aaa;
}

.review-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.dark-theme .review-title {
    color: var(--light-text);
}

.more-reviews-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.dark-theme .more-reviews-btn {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.more-reviews-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.dark-theme .more-reviews-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.write-review {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.dark-theme .write-review {
    border-color: #444;
}

.rating-select {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.star-rating {
    display: flex;
    gap: 5px;
}

.star-rating i {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
}

.dark-theme .star-rating i {
    color: #555;
}

.star-rating i.bxs-star {
    color: #ffd700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

.dark-theme .form-group label {
    color: var(--light-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
}

.dark-theme .form-group input,
.dark-theme .form-group textarea {
    background-color: #333;
    color: var(--light-text);
    border-color: #444;
}

.submit-review-btn {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.submit-review-btn:hover {
    background-color: var(--hover-color);
}

/* Related Products */
.related-products,
.recently-viewed {
    padding: 40px 5%;
}

.related-products h2,
.recently-viewed h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.dark-theme .related-products h2,
.dark-theme .recently-viewed h2 {
    color: var(--light-text);
}

.related-items-grid,
.recent-items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.related-items-grid .item,
.recent-items-grid .item {
    flex: 0 0 calc(25% - 30px);
    min-width: 250px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.dark-theme .related-items-grid .item,
.dark-theme .recent-items-grid .item {
    background-color: var(--dark-bg);
}

.related-items-grid .item:hover,
.recent-items-grid .item:hover {
    transform: translateY(-10px);
}

.related-items-grid .item a,
.recent-items-grid .item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-items-grid .item img,
.recent-items-grid .item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-items-grid .item h3,
.recent-items-grid .item h3 {
    font-size: 18px;
    margin: 15px 0 5px;
    padding: 0 15px;
    color: var(--primary-color);
}

.dark-theme .related-items-grid .item h3,
.dark-theme .recent-items-grid .item h3 {
    color: var(--light-text);
}

.related-items-grid .item p,
.recent-items-grid .item p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding: 0 15px;
    color: var(--accent-color);
}

.dark-theme .related-items-grid .item p,
.dark-theme .recent-items-grid .item p {
    color: var(--secondary-color);
}

.related-items-grid .item button {
    margin: 0 15px 15px;
    width: calc(100% - 30px);
}

.recently-viewed {
    background-color: var(--light-bg);
}

.dark-theme .recently-viewed {
    background-color: var(--dark-bg);
}

/* Make cart more visible */
#cart-icon {
    display: flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    margin-left: 10px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

#cart-icon:hover {
    background: var(--hover-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* Responsive styles */
@media screen and (max-width: 992px) {
    .product-images,
    .product-info {
        min-width: 300px;
    }
    
    .related-items-grid .item,
    .recent-items-grid .item {
        flex: 0 0 calc(33.333% - 30px);
    }
}

@media screen and (max-width: 768px) {
    .product-detail {
        gap: 30px;
    }
    
    .product-images,
    .product-info {
        flex: 100%;
        min-width: 100%;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .related-items-grid .item,
    .recent-items-grid .item {
        flex: 0 0 calc(50% - 15px);
    }
    
    .review-summary {
        gap: 20px;
    }
    
    .overall-rating,
    .rating-bars {
        flex: 100%;
    }
}

@media screen and (max-width: 480px) {
    .product-detail {
        padding: 20px 5%;
    }
    
    .main-image {
        min-width: 100%;
    }
    
    .related-items-grid .item,
    .recent-items-grid .item {
        flex: 0 0 100%;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}