/* ============================================================
   Shop Connector — Frontend Styles
   These are structural/layout styles. Override in your theme.
   ============================================================ */

/* ---- Layout ---- */
.sc-shop-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.sc-category-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.sc-product-grid-wrapper {
    flex: 1;
    min-width: 0;
}

/* ---- Category nav ---- */
.sc-category-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sc-category-nav a {
    display: block;
    padding: 6px 10px;
    text-decoration: none;
    border-radius: 3px;
    color: inherit;
}

.sc-category-nav a:hover,
.sc-category-nav a.active {
    background: #f0f0f0;
    font-weight: bold;
}

.sc-cat-parent > summary {
    cursor: pointer;
    list-style: none;
    padding: 6px 10px;
}

.sc-cat-parent > summary::-webkit-details-marker { display: none; }

.sc-cat-children {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: none;
}

.sc-cat-children li { margin: 2px 0; }

/* ---- Product grid ---- */
.sc-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.sc-product-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sc-product-card__image-link {
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8f8f8;
}

.sc-product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.sc-product-card:hover .sc-product-card__image {
    transform: scale(1.03);
}

.sc-product-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
}

.sc-product-card__body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sc-product-card__number {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.sc-product-card__title {
    font-size: 14px;
    margin: 0 0 8px;
    flex: 1;
}

.sc-product-card__title a {
    text-decoration: none;
    color: inherit;
}

.sc-product-card__price {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
}

.sc-price-unit {
    font-size: 12px;
    font-weight: normal;
    color: #666;
}

/* ---- Cart table ---- */
.sc-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.sc-cart-table th,
.sc-cart-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.sc-cart-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.sc-qty-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sc-qty-controls button {
    width: 28px;
    height: 28px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 3px;
}

.sc-qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ccc;
    padding: 4px;
    border-radius: 3px;
}

.sc-remove-item {
    background: none;
    border: none;
    cursor: pointer;
    color: #cc0000;
    font-size: 16px;
    padding: 2px 6px;
}

/* ---- Single product ---- */
.sc-single-product {
    max-width: 1100px;
    margin: 0 auto;
}

.sc-single-product__breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.sc-single-product__breadcrumb a {
    color: #666;
    text-decoration: none;
}

.sc-single-product__main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.sc-gallery-main__img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.sc-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sc-gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 3px;
    cursor: pointer;
}

.sc-gallery-thumb.active,
.sc-gallery-thumb:hover {
    border-color: #333;
}

.sc-product-number { font-size: 13px; color: #888; margin-bottom: 4px; }
.sc-product-title  { font-size: 26px; margin-bottom: 12px; }

.sc-product-price {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
}

.sc-add-to-cart-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* ---- Accordions ---- */
.sc-accordion {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
}

.sc-accordion > summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: bold;
    list-style: none;
    user-select: none;
}

.sc-accordion > summary::-webkit-details-marker { display: none; }

.sc-accordion__content {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
}

.sc-tech-table { width: auto; }
.sc-tech-table th, .sc-tech-table td { border: none; padding: 4px 16px 4px 0; }
.sc-tech-table th { font-weight: bold; min-width: 140px; }

.sc-references-list,
.sc-downloads-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sc-references-list li,
.sc-downloads-list li {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sc-ref-qty { font-weight: bold; margin-right: 6px; }
.sc-ref-optional { color: #888; font-size: 12px; margin-left: 6px; }

/* ---- Inquiry form ---- */
.sc-inquiry-form-wrapper { max-width: 800px; }

.sc-form-section {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.sc-form-section legend {
    font-weight: bold;
    font-size: 16px;
    padding: 0 8px;
}

.sc-form-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sc-form-field {
    margin-bottom: 14px;
}

.sc-form-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    font-size: 13px;
}

.sc-form-field input,
.sc-form-field select,
.sc-form-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.sc-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sc-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

.sc-order-table {
    width: 100%;
    border-collapse: collapse;
}

.sc-order-table th,
.sc-order-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
}

.sc-order-table th { background: #f5f5f5; }

.sc-price-disclaimer {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.sc-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

.sc-form-errors {
    background: #fef0f0;
    border: 1px solid #f5c6c6;
    border-radius: 3px;
    padding: 12px;
    color: #cc0000;
    margin-top: 10px;
}

.sc-form-success {
    background: #f0fef4;
    border: 1px solid #c6f5d0;
    border-radius: 3px;
    padding: 12px;
    color: #006600;
    margin-top: 10px;
}

/* ---- Cart notification ---- */
.sc-cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 9999;
    font-size: 14px;
}

.sc-notif-error { background: #cc0000; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sc-shop-wrapper {
        flex-direction: column;
    }
    .sc-category-sidebar {
        width: 100%;
    }
    .sc-single-product__main {
        grid-template-columns: 1fr;
    }
    .sc-form-row--2col {
        grid-template-columns: 1fr;
    }
}
