/* Buy Page Styles - Dark Mode */
.buy-page-wrapper {
    padding: 100px 0 60px;
    min-height: 80vh;
    background: #0a0a0a;
}

/* Breadcrumb */
.buy-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
}

.buy-breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.buy-breadcrumb a:hover {
    color: #dc2626;
}

.buy-breadcrumb i.fa-chevron-right {
    font-size: 10px;
    color: #555;
}

.buy-breadcrumb span {
    color: #fff;
    font-weight: 500;
}

/* Content Layout */
.buy-page-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Left Column - Product Info */
.buy-left {
    /* static position */
}

/* Right Column - Purchase Box */
.buy-right {
    position: sticky;
    top: 100px;
}

.product-info-card {
    background: #1a1a1a;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Product Header: Image Left, Info Right */
.product-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.product-image {
    position: relative;
    width: 100px;
    min-width: 100px;
    height: 100px;
    border-radius: 0.75rem;
    overflow: hidden;
}

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

.discount-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc2626;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.product-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.product-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #dc2626;
}

.product-price {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.product-price del {
    color: #666;
    font-size: 0.8rem;
}

.product-price .current-price {
    color: #dc2626;
    font-size: 1.2rem;
    font-weight: 700;
}

.product-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 0.8rem;
}

.meta-item i {
    color: #666;
}

.meta-item strong {
    color: #fff;
}

/* Hot Deal Box */
.hot-deal-box {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.hot-deal-title {
    font-weight: 600;
    color: #dc2626;
}

.hot-deal-item {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 0.25rem;
}

/* Description Section - Bottom */
.description-section {
    margin-top: 30px;
    background: #1a1a1a;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.desc-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desc-title i {
    color: #dc2626;
}

.desc-body {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.7;
    word-wrap: break-word;
}

/* Guide Box */
.guide-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 0.5rem;
    border-left: 3px solid #3b82f6;
}

.guide-box h6 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.guide-box p {
    margin: 0;
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.5;
}

.guide-box a {
    color: #3b82f6;
}

/* Share Section */
.share-section {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-label {
    color: #888;
    font-size: 0.85rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-buttons a {
    width: 36px;
    height: 36px;
    background: #2a2a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.2s;
    font-size: 1rem;
}

.share-buttons a:hover {
    background: #dc2626;
    color: #fff;
}


.purchase-box {
    background: #1a1a1a;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.purchase-title {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
}

.form-row-vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

#custom-inputs {
    max-height: 180px;
    overflow-y: auto;
}

.form-label {
    color: #aaa;
    font-size: 0.9rem;
}

.form-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.text-success {
    color: #22c55e !important;
}

.text-danger {
    color: #dc2626 !important;
}

.text-primary {
    color: #3b82f6 !important;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
}

.qty-btn {
    width: 36px;
    height: 36px;
    background: #2a2a2a;
    border: 1px solid #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-minus {
    border-radius: 0.4rem 0 0 0.4rem;
}

.qty-plus {
    border-radius: 0 0.4rem 0.4rem 0;
}

.qty-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.qty-input {
    width: 60px;
    height: 36px;
    background: #222;
    border: 1px solid #333;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.qty-input:focus {
    outline: none;
}

/* Coupon Input */
.coupon-row {
    flex-wrap: wrap;
}

.coupon-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.coupon-input-wrapper .form-input {
    max-width: 150px;
}

.btn-apply {
    padding: 0.5rem 0.85rem;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-apply:hover {
    background: #b91c1c;
}

/* Form Input */
.form-input {
    flex: 1;
    max-width: 200px;
    padding: 0.5rem 0.85rem;
    background: #222;
    border: 1px solid #333;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    color: #fff;
    transition: all 0.2s;
}

.form-row-vertical .form-input {
    max-width: none;
    margin-bottom: 0.5rem;
}

#custom-inputs .form-input {
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #dc2626;
}

.form-input::placeholder {
    color: #666;
}

/* Total Row */
.total-row {
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #333;
}

.total-amount {
    font-size: 1.2rem !important;
}

/* Favorite Section */
.favorite-section {
    padding: 1rem 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    margin: 1rem 0;
}

.favorite-checkbox {
    display: none;
}

.favorite-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #888;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.favorite-label:hover {
    color: #fff;
}

.favorite-label svg {
    transition: all 0.2s;
}

.fav-text-added {
    display: none;
}

.favorite-checkbox:checked + .favorite-label {
    color: #dc2626;
}

.favorite-checkbox:checked + .favorite-label svg {
    fill: #dc2626;
    stroke: #dc2626;
}

.favorite-checkbox:checked + .favorite-label .fav-text-add {
    display: none;
}

.favorite-checkbox:checked + .favorite-label .fav-text-added {
    display: inline;
}

/* Buy Button */
.buy-btn {
    width: 100%;
    padding: 1rem;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.buy-btn:hover {
    background: #b91c1c;
}

.buy-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Back Button */
.back-btn {
    width: 100%;
    padding: 0.85rem;
    background: #2a2a2a;
    color: #888;
    border: 1px solid #333;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.back-btn:hover {
    background: #333;
    color: #fff;
}

/* Responsive */
@media (max-width: 991px) {
    .buy-page-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .buy-left,
    .buy-right {
        position: static;
    }
    
    .buy-page-wrapper {
        padding: 100px 0 100px;
    }
    
    .description-section {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .product-info-card,
    .purchase-box,
    .description-section {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1.15rem;
    }
    
    .product-price .current-price {
        font-size: 1.35rem;
    }
    
    .form-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .form-input {
        max-width: none;
        width: 100%;
    }
    
    .buy-breadcrumb {
        font-size: 13px;
    }
}
