/* Breadcrumb */
.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    font-size: 14px;
}
.product-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.product-breadcrumb a:hover {
    color: var(--secondary-color);
}
.product-breadcrumb i {
    font-size: 12px;
    color: var(--text-muted);
}
.product-breadcrumb span {
    color: var(--primary-color);
    font-weight: 500;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 20px;
}

/* LEFT SIDE */
.product-left h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 18px;
    color: #f5a623;
}
.product-rating span {
    font-size: 14px;
    color: var(--text-muted);
}

.product-main-image {
    width: 100%;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.product-gallery img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: border-color 0.2s;
}
.product-gallery img:hover {
    border-color: var(--secondary-color);
}

.product-description {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* RIGHT SIDE */
.product-right h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--button-primary);
}

.material-pick {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.material-pick label {
    font-size: 16px;
    font-weight: 600;
}
.compare-link {
    font-size: 14px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}
.compare-link:hover {
    text-decoration: underline;
}

.material-wrapper select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--button-primary);
    border-radius: 12px;
    font-family: var(--main-font);
    font-size: 18px;
    background: var(--bg-light);
    margin-bottom: 24px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236c6c6f' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}
.material-wrapper select:focus {
    outline: none;
    border-color: var(--button-primary);
    box-shadow: 0 0 0 3px rgba(17, 155, 51, 0.1);
}

/* Printer Type */
.printer-type {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.printer-type button {
    padding: 10px 20px;
    border: 2px solid var(--border-light);
    border-radius: 40px;
    background: var(--bg-light);
    font-family: var(--main-font);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}
.printer-type button:hover {
    border-color: var(--secondary-color);
}
.printer-type button.active {
    border-color: var(--button-primary);
    background: var(--faded-primary);
}

/* Roll core Variation Buttons */
.core-type {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.core-type button {
    flex: 1;
    min-width: 120px;
    padding: 14px 18px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-light);
    font-family: var(--main-font);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.core-type button:hover {
    border-color: var(--secondary-color);
    background: var(--bg-muted);
}

.core-type button.active {
    border-color: var(--button-primary);
    background: var(--faded-primary);
    color: var(--button-primary);
}

.core-type button .roll-size {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.core-type button .roll-size i {
    font-size: 14px;
    color: var(--secondary-color);
}

.core-type button.active .roll-size i {
    color: var(--button-primary);
}

.core-type button .roll-details {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.core-type button.active .roll-details {
    color: var(--button-primary);
}

/* Quantity & Price */
.price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.price-tier-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--button-primary);
    border-radius: 12px;
    font-family: var(--main-font);
    font-size: 18px;
    background: var(--bg-light);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236c6c6f' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}
.price-tier-select:focus {
    outline: none;
    border-color: var(--button-primary);
    box-shadow: 0 0 0 3px rgba(17, 155, 51, 0.1);
}

.customQuantity {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--button-primary);
    border-radius: 12px;
    font-family: var(--main-font);
    font-size: 18px;
}
.customQuantity:focus {
    outline: none;
    border-color: var(--button-primary);
    box-shadow: 0 0 0 3px rgba(17, 155, 51, 0.1);
}

/* Price Display */
.price-display {
    background: var(--bg-muted);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}
.pd-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.pd-row:last-child {
    border-bottom: none;
}
.pd-row.pd-total-row {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--secondary-color);
    border-top: 2px solid var(--border-light);
    padding-top: 14px;
    margin-top: 4px;
}
.pd-label {
    color: var(--text-muted);
}

/* Material Compare Popup */
.material-compare-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}
.material-compare-popup.active {
    display: block;
}
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-light);
    border-radius: 24px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}
.popup-close:hover {
    color: var(--primary-color);
}
.popup-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}
/* Material List */
.material-list {
  display: grid;
  gap: 20px;
}

.material-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
  align-items: flex-start;
}

.material-item:hover {
  border-color: var(--button-primary);
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.material-item.selected {
  border-color: var(--button-primary);
  background-color: #f0f7ff;
}

.material-swatch {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.material-swatch img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.material-info {
  flex: 1;
}

.material-info h3 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 18px;
}

.material-description {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.material-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #555;
}

.material-specs li {
  margin-bottom: 5px;
  line-height: 1.4;
}

.material-specs strong {
  color: #333;
}

.select-material-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  background-color: var(--button-primary);
  color: var(--text-dark);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: center;
}

.select-material-btn:hover {
  background-color: var(--button-primary);
}

.select-material-btn.active {
  background-color: #28a745;
}

/* Responsive */
@media (max-width: 900px) {
    .product-view-wrapper {
        padding: 0 24px 50px 24px;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .product-left h1 {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .product-view-wrapper {
        padding: 0 16px 40px 16px;
    }
    .product-left h1 {
        font-size: 24px;
    }
    .product-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    .popup-content {
        padding: 24px;
    }
    .material-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .material-swatch {
        margin: 0 auto;
    }
    .select-material-btn {
        width: 100%;
    }
}

/* Add to Cart Button */
.add-to-cart-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.add-to-cart-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--button-primary);
    color: white;
    border: none;
    border-radius: 48px;
    font-family: var(--main-font);
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.add-to-cart-btn:hover {
    background: #0d852b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn i {
    font-size: 18px;
}

.cart-message {
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    animation: fadeSlideIn 0.3s ease;
}

.cart-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.cart-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reviews */
.reviews-section{
    background:#f9f9f9;
    padding:60px 20px;
}

.reviews-container{
    max-width:1100px;
    margin:auto;
}

.reviews-header{
    text-align:center;
    margin-bottom:40px;
}

.reviews-header h2{
    font-size:30px;
    margin-bottom:10px;
}

.overall-rating{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:5px;
}

.rating-number{
    font-size:40px;
    font-weight:bold;
}

.stars{
    color:#f5a623;
}

.reviews-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
}

.review-card{
    background:#fff;
    padding:25px;
    border-radius:10px;
    box-shadow:0 5px 20px rgba(0,0,0,0.05);
}

.review-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.review-text{
    font-size:16px;
    line-height:1.6;
    margin-bottom:10px;
}

.review-date{
    font-size:12px;
    color:#777;
}

/* Mobile */
@media (max-width:768px){
    .reviews-grid{
        grid-template-columns:1fr;
    }
}



/* Toast */
.product-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a1a1a;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 1001;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
}