/**
 * Plantscount Core - Product Page Styles
 * Professional, clean design
 */

:root {
    --pc-forest: #1a3a1a;
    --pc-sage: #7a9b7a;
    --pc-primary: #89A550;
    --pc-primary-dark: #6b8540;
    --pc-cream: #faf7f2;
    --pc-charcoal: #2c2c2c;
    --pc-mist: #e8ebe8;
    --pc-white: #ffffff;
    --pc-error: #c44d4d;
    --pc-success: #4a7c4a;
}

/* ===== Pot Widget Container ===== */
.pc-pot-widget {
    background: var(--pc-white);
    border: 1px solid var(--pc-mist);
    border-radius: 8px;
    padding: 0;
    margin: 24px 0;
}

.pc-pot-widget__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--pc-mist);
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: left;
}

.pc-pot-widget__header:hover {
    background: var(--pc-cream);
}

.pc-pot-widget__header[aria-expanded="true"] {
    border-bottom-color: transparent;
}

.pc-pot-widget__header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pc-pot-widget__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--pc-forest);
    margin: 0;
}

.pc-pot-widget__discount {
    background: var(--pc-primary);
    color: var(--pc-white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ===== Toggle Button ===== */
.pc-pot-widget__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pc-sage);
    flex-shrink: 0;
}

.pc-pot-widget__toggle-text {
    font-size: 14px;
    font-weight: 500;
}

.pc-pot-widget__toggle-icon {
    transition: transform 0.3s ease;
}

.pc-pot-widget__header[aria-expanded="true"] .pc-pot-widget__toggle-icon {
    transform: rotate(180deg);
}

/* ===== Content Area ===== */
.pc-pot-widget__content {
    padding: 24px;
    animation: slideDown 0.3s ease-out;
}

.pc-pot-widget__content[hidden] {
    display: none;
    animation: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Mode Toggle ===== */
.pc-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.pc-mode-toggle__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--pc-white);
    border: 1px solid var(--pc-mist);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-mode-toggle__btn:hover {
    border-color: var(--pc-sage);
}

.pc-mode-toggle__btn--active {
    background: var(--pc-cream);
    border-color: var(--pc-primary);
    color: var(--pc-forest);
}

/* ===== Mode Description ===== */
.pc-mode-description {
    background: var(--pc-cream);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.pc-mode-description p {
    margin: 0;
    font-size: 13px;
    color: var(--pc-charcoal);
    line-height: 1.5;
}

.pc-mode-description--hidden {
    display: none;
}

/* ===== Pot Grid ===== */
.pc-pot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pc-pot-grid--hidden {
    display: none;
}

.pc-pot-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--pc-sage);
    padding: 24px;
}

/* ===== Pot Card ===== */
.pc-pot-card {
    background: var(--pc-white);
    border: 1px solid var(--pc-mist);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-pot-card:hover {
    border-color: var(--pc-sage);
}

.pc-pot-card--selected {
    border-color: var(--pc-primary);
    box-shadow: 0 0 0 1px var(--pc-primary);
}

.pc-pot-card__image {
    aspect-ratio: 1;
    background: var(--pc-cream);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-pot-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-pot-card__placeholder {
    color: var(--pc-sage);
}

.pc-pot-card__info {
    margin-bottom: 10px;
}

.pc-pot-card__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-charcoal);
    margin: 0 0 6px;
}

.pc-pot-card__pricing {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pc-pot-card__combo-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--pc-forest);
}

.pc-pot-card__savings {
    font-size: 12px;
    color: var(--pc-primary);
}

.pc-pot-card__select {
    width: 100%;
    padding: 8px;
    background: var(--pc-white);
    border: 1px solid var(--pc-mist);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pc-charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-pot-card__select:hover {
    background: var(--pc-cream);
}

.pc-pot-card--selected .pc-pot-card__select {
    background: var(--pc-primary);
    border-color: var(--pc-primary);
    color: var(--pc-white);
}

/* ===== Accessories Section ===== */
.pc-accessories {
    border-top: 1px solid var(--pc-mist);
    padding-top: 20px;
    margin-bottom: 20px;
}

.pc-accessories--hidden {
    display: none;
}

.pc-accessory-section {
    margin-bottom: 20px;
}

.pc-accessory-section:last-child {
    margin-bottom: 0;
}

.pc-accessory-section__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pc-accessory-section__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-forest);
    margin: 0;
}

/* ===== Info Button ===== */
.pc-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--pc-cream);
    border: none;
    border-radius: 50%;
    color: var(--pc-sage);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-info-btn:hover {
    background: var(--pc-mist);
    color: var(--pc-forest);
}

/* ===== Accessory Options ===== */
.pc-accessory-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pc-accessory-option {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--pc-white);
    border: 1px solid var(--pc-mist);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-accessory-option:hover {
    border-color: var(--pc-sage);
}

.pc-accessory-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.pc-accessory-option:has(input:checked) {
    border-color: var(--pc-primary);
    background: var(--pc-cream);
}

.pc-accessory-option__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-accessory-option__name {
    font-size: 14px;
    font-weight: 500;
}

.pc-accessory-option__price {
    font-size: 13px;
    color: var(--pc-sage);
}

.pc-accessory-option__description {
    display: none;
    font-size: 12px;
    color: var(--pc-sage);
    margin-top: 6px;
    line-height: 1.4;
}

.pc-accessory-option:has(input:checked) .pc-accessory-option__description {
    display: block;
}

/* ===== Accessory Checkbox ===== */
.pc-accessory-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--pc-white);
    border: 1px solid var(--pc-mist);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-accessory-checkbox:hover {
    border-color: var(--pc-sage);
}

.pc-accessory-checkbox:has(input:checked) {
    border-color: var(--pc-primary);
    background: var(--pc-cream);
}

.pc-accessory-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.pc-accessory-checkbox__box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid var(--pc-mist);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pc-accessory-checkbox__box svg {
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.pc-accessory-checkbox input:checked+.pc-accessory-checkbox__box {
    background: var(--pc-primary);
    border-color: var(--pc-primary);
}

.pc-accessory-checkbox input:checked+.pc-accessory-checkbox__box svg {
    opacity: 1;
    transform: scale(1);
    color: var(--pc-white);
}

.pc-accessory-checkbox__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.pc-accessory-checkbox__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-charcoal);
}

.pc-accessory-checkbox__price {
    font-size: 13px;
    color: var(--pc-sage);
}

/* ===== Modal ===== */
.pc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pc-modal[hidden] {
    display: none;
}

.pc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.pc-modal__content {
    position: relative;
    background: var(--pc-white);
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
}

.pc-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--pc-cream);
    border: none;
    border-radius: 50%;
    color: var(--pc-charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-modal__close:hover {
    background: var(--pc-mist);
}

.pc-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--pc-forest);
    margin: 0 0 16px;
    padding-right: 40px;
}

.pc-modal__body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--pc-charcoal);
}

.pc-modal__body h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--pc-forest);
    margin: 20px 0 12px;
}

.pc-modal__body p {
    margin: 0 0 16px;
}

/* ===== Visualizer Section ===== */
.pc-visualizer-section {
    border-top: 1px solid var(--pc-mist);
    padding-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.pc-visualizer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--pc-white);
    border: 1px solid var(--pc-forest);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-forest);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-visualizer-btn:hover {
    background: var(--pc-forest);
    color: var(--pc-white);
}

.pc-visualizer-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--pc-sage);
}

/* ===== Combo Summary ===== */
.pc-combo-summary {
    background: var(--pc-cream);
    border-radius: 8px;
    padding: 16px;
}

.pc-combo-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pc-combo-summary__label {
    font-size: 14px;
    color: var(--pc-charcoal);
}

.pc-combo-summary__price {
    font-size: 20px;
    font-weight: 700;
    color: var(--pc-forest);
}

.pc-combo-summary__discount {
    font-size: 12px;
    color: var(--pc-primary);
    margin-bottom: 12px;
}

.pc-combo-summary__discount[hidden] {
    display: none;
}

.pc-add-combo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--pc-primary);
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--pc-white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-add-combo-btn:hover {
    background: var(--pc-primary-dark);
}

.pc-add-combo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .pc-pot-widget__header {
        padding: 16px 20px;
    }

    .pc-pot-widget__header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pc-pot-widget__title {
        font-size: 16px;
    }

    .pc-pot-widget__toggle-text {
        display: none;
    }

    .pc-pot-widget__content {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .pc-pot-widget__header {
        padding: 14px 16px;
    }

    .pc-pot-widget__content {
        padding: 16px;
    }

    .pc-mode-toggle {
        flex-direction: column;
    }

    .pc-pot-grid {
        grid-template-columns: 1fr;
    }
}